summaryrefslogtreecommitdiff
path: root/lib/GitHub/Collector/Role/Logger.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/GitHub/Collector/Role/Logger.pm')
-rw-r--r--lib/GitHub/Collector/Role/Logger.pm27
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/GitHub/Collector/Role/Logger.pm b/lib/GitHub/Collector/Role/Logger.pm
new file mode 100644
index 0000000..0d16307
--- /dev/null
+++ b/lib/GitHub/Collector/Role/Logger.pm
@@ -0,0 +1,27 @@
+package GitHub::Collector::Role::Logger;
+
+use Moose::Role;
+use Log::Dispatchouli;
+
+has logger => (
+ is => 'rw',
+ isa => 'Log::Dispatchouli',
+ lazy => 1,
+ default => sub {
+ my $logger = Log::Dispatchouli->new(
+ {
+ ident => 'GitHub::Collector',
+ facility => 'user',
+ to_stdout => 1,
+ }
+ );
+ },
+ handles => {
+ log => 'log',
+ debug => 'log_debug',
+ fatal => 'log_fatal',
+ error => 'log_error',
+ },
+);
+
+1;