OSDN Git Service

Eventd: fix typo and use DefaultConfig Plugin
authorhylom <hylom@users.sourceforge.jp>
Tue, 30 Oct 2018 10:05:14 +0000 (19:05 +0900)
committerhylom <hylom@users.sourceforge.jp>
Tue, 30 Oct 2018 10:05:14 +0000 (19:05 +0900)
src/newslash_web/lib/Newslash/Eventd.pm
src/newslash_web/lib/Newslash/Eventd/Handlers.pm

index 3f876ff..ae33855 100644 (file)
@@ -19,6 +19,9 @@ sub startup {
     }
     # TODO: load/save configs with database
 
+    # load default configuration values
+    $app->plugin('Newslash::Plugin::DefaultConfig');
+
     # when "test" mode, output debug logs.
     $app->log->level('debug') if $app->mode eq 'test';
 
index 9b1c734..260e4ab 100644 (file)
@@ -91,7 +91,7 @@ sub execute {
 
     my $f = $handler->can($item->{event_subtype});
     if ($f) {
-        $self->app->log->debug("handler $item->'{event_subtype}' found for '$item->{event_type}'");
+        $self->app->log->debug("handler '$item->{event_subtype}' found for '$item->{event_type}'");
         $f->($handler, $item);
         return;
     }