Dancer2::Logger::Syslog - Dancer2 logger engine for Sys::Syslog
version 0.5
This module implements a logger engine that sends log messages to syslog, through the Sys::Syslog module.
Note: You might want to use Dancer2::Logger::LogReport instead, which contains a syslog dispatcher, but is much more powerful than this module.
Writes the log message to the file.
The setting logger should be set to Syslog in order to use this logging engine in a Dancer2 application.
Syslog
The attributes in the following example configuration are supported:
logger: "Syslog" engines: logger: Syslog: facility: "LOCAL0" ident: "my_app" logopt: "pid" host: "10.0.0.1" port: "10000" type: "tcp"
The allowed options are:
Which syslog facility to use, defaults to 'USER'
String prepended to every log line, defaults to the configured appname or, if not defined, to the executable's basename.
Log options passed to openlog() as per Sys::Syslog's docs. Defaults to 'pid'.
openlog()
host option passed if set to setlogsock() as per Sys:Syslog's docs
setlogsock()
port option passed if host is set to setlogsock() as per Sys:Syslog's docs defaults to 53
type option passed if host is set to setlogsock() as per Sys:Syslog's docs defaults to udp
This module depends on Sys::Syslog. To use network logging it requires a minimum of version 0.33. Otherwise the network options are ignored.
See Dancer2 for details about logging in route handlers.
See Dancer2::Logger::LogReport for a much more powerful logger, which also contains a syslog provider.
Andy Beverley <andy@andybev.com>
Yanick Champoux <yanick@cpan.org>
This software is copyright (c) 2015 by Andy Beverley, Yanick Champoux, Alexis Sukrieh
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Dancer2::Logger::Syslog, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Dancer2::Logger::Syslog
CPAN shell
perl -MCPAN -e shell install Dancer2::Logger::Syslog
For more information on module installation, please visit the detailed CPAN module installation guide.