Masatoshi Mizuno > Egg-Plugin-Log-Syslog > Egg::Plugin::Log::Syslog

Download:
Egg-Plugin-Log-Syslog-0.01.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 0.01   Source  

NAME ^

Egg::Plugin::Log::Syslog - Plugin for Sys::Syslog.

SYNOPSIS ^

  use Egg qw/ Log::Syslog /;

  # It writes it in the log.
  $e->slog(' log message ');

DESCRIPTION ^

It is a plugin to use Log::Syslog module.

CONFIGRATION ^

First of all, please set Syslog.

  # * It is a setting example for Linux.
  
  % vi /etc/syslog.conf
  local3.*    /var/log/myapp_log
  
  % /sbin/service syslog restart
  
  # Whether the setting became effective is confirmed.
  % logger -p local3.debug ' TEST OK!! '
  % tail /var/log/myapp_log

After the above-mentioned is set, the setting of plugin_syslog is added to the configuration of the project.

  plugin_syslog => {
    facility    => 'local3',
    handle      => 'MYAPPLOG',
    unix_socket => 1,
    level       => 'debug',
    },

It is as follows of each item.

And, it might be good to put the setting of the following rotations on '/etc/logrotate.d'.

  /var/log/myapp_log {
    weekly
    missingok
    notifempty
  }

* I think that it should reactivate the WEB server and the database server after it rotates.

METHODS ^

slog ([LOG_MESSAGE])

LOG_MESSAGE is written the log.

  $e->slog(' myapp memo. ');

SEE ALSO ^

Sys::Syslog, Egg::Release,

AUTHOR ^

Masatoshi Mizuno <lushe@cpan.org>

COPYRIGHT ^

Copyright (C) 2007 by Bee Flag, Corp. <http://egg.bomcity.com/>, All Rights Reserved.

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.6 or, at your option, any later version of Perl 5 you may have available.