summaryrefslogtreecommitdiff
path: root/lib/GitHub/Collector/Role/Logger.pm
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2011-06-13 16:33:23 +0200
committerfranck cuny <franck@lumberjaph.net>2011-06-13 16:33:23 +0200
commit871336c030209b46ae6b124a702677363487f9a8 (patch)
tree86f234d42c68b26a7aeb9cc373667127ad661e19 /lib/GitHub/Collector/Role/Logger.pm
parentuse template_toolkit and add infos about colors (diff)
downloadstargit-871336c030209b46ae6b124a702677363487f9a8.tar.gz
import github::collector
Signed-off-by: franck cuny <franck@lumberjaph.net>
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;