The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Dancer2::Logger::Syslog - Dancer2 logger engine for Sys::Syslog

VERSION

version 0.3

DESCRIPTION

This module implements a logger engine that send log messages to syslog, through the Sys::Syslog module.

METHODS

log($level, $message)

Writes the log message to the file.

CONFIGURATION

The setting logger should be set to Syslog in order to use this logging engine in a Dancer2 application.

The attributes in the following example configuration are supported:

  logger: "Syslog"

  engines:
    logger:
      Syslog:
        facility: "LOCAL0"
        ident: "my_app"
        logopt: "pid"

The allowed options are:

facility

Which syslog facility to use, defaults to 'USER'

ident

String prepended to every log line, defaults to the configured appname or, if not defined, to the executable's basename.

logopt

Log options passed to openlog() as per Sys::Syslog's docs. Defaults to 'pid'.

METHODS

DEPENDENCY

This module depends on Sys::Syslog.

SEE ALSO

See Dancer2 for details about logging in route handlers.

AUTHORS

  • Andy Beverley <andy@andybev.com>

  • Yanick Champoux <yanick@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 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.