Max Schubert > Sys-Syslog-OO-1.00 > Sys::Syslog::OO

Download:
Sys-Syslog-OO-1.00.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 1.00   Source  

NAME ^

Sys::Syslog::OO - Thin object-oriented wrapper around Sys::Syslog::OO

SYNOPSIS ^

  package My::Cool::Package;

  use Sys::Syslog::OO;
  use base qw(Sys::Syslog::OO);

  sub new {

      my ($class, $cfg) = @_;

      my $facility = 'LOG_LOCAL7';

      if (exists $cfg->{'syslog_facility'}) {
          $facility = $cfg->{'syslog_facility'};
      }

      my $self = $class->SUPER::new({'label'    => 'mycoolprogram',
                                     'facility' => $facility });
      # ... other initialization code ...

      return $self;
  }

DESCRIPTION ^

Thin OO-wrapper around Sys::Syslog. Why? Less chance of mis-typing log levels and less noisy code. Can also be used with multiple-inheritence to add logging to a new or existing class.

THANKS ^

Special thanks to Mike Fischer, Jason Livingood, and Comcast for allowing me to contribute this code to the OSS community.

AUTHOR ^

Max Schubert <maxschube@cpan.org>

COPYRIGHT ^

Copyright (C) 2009 by Max Schubert / Comcast

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.

syntax highlighting: