.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Log::Any::Adapter::Syslog 3" .TH Log::Any::Adapter::Syslog 3 2024-09-01 "perl v5.40.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Log::Any::Adapter::Syslog \- Send Log::Any logs to syslog .SH VERSION .IX Header "VERSION" version 1.717 .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 4 \& use Log::Any::Adapter \*(AqSyslog\*(Aq; \& # ... or ... \& use Log::Any::Adapter; \& Log::Any::Adapter\->set(\*(AqSyslog\*(Aq); \& \& # You can override defaults: \& Log::Any::Adapter\->set( \& \*(AqSyslog\*(Aq, \& # name defaults to basename($0) \& name => \*(Aqmy\-name\*(Aq, \& # options default to "pid" \& options => "pid,ndelay", \& # facility defaults to "local7" \& facility => "mail" \& ); .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" Log::Any is a generic adapter for writing logging into Perl modules; this adapter use the Sys::Syslog module to direct that output into the OS's logging system (even on Windows). .SH CONFIGURATION .IX Header "CONFIGURATION" \&\f(CW\*(C`Log::Any::Adapter::Syslog\*(C'\fR is designed to work out of the box with no configuration required; the defaults should be reasonably sensible. .PP You can override the default configuration by passing extra arguments to the \&\f(CW\*(C`Log::Any::Adapter\*(C'\fR method: .IP name 4 .IX Item "name" The \fIname\fR argument defaults to the basename of \f(CW$0\fR if not supplied, and is inserted into each line sent to syslog to identify the source. .IP options 4 .IX Item "options" The \fIoptions\fR configure the behaviour of syslog; see Sys::Syslog for details. .Sp The default is \f(CW"pid"\fR, which includes the PID of the current process after the process name: .Sp .Vb 1 \& example\-process[2345]: something amazing! .Ve .Sp The most likely addition to that is \f(CW\*(C`perror\*(C'\fR (non-POSIX) which causes syslog to also send a copy of all log messages to the controlling terminal of the process. .IP facility 4 .IX Item "facility" The \fIfacility\fR determines where syslog sends your messages. The default is \&\f(CW\*(C`local7\*(C'\fR, which is not the most useful value ever, but is less bad than assuming the fixed facilities. .Sp See Sys::Syslog and \fBsyslog\fR\|(3) for details on the available facilities. .IP log_level 4 .IX Item "log_level" Minimum log level. All messages below the selected level will be silently discarded. Default is debug. .Sp If LOG_LEVEL environment variable is set, it will be used instead. If TRACE environment variable is set to true, level will be set to 'trace'. If DEBUG environment variable is set to true, level will be set to 'debug'. If VERBOSE environment variable is set to true, level will be set to 'info'.If QUIET environment variable is set to true, level will be set to 'error'. .SH AUTHORS .IX Header "AUTHORS" .IP \(bu 4 Jonathan Swartz .IP \(bu 4 David Golden .IP \(bu 4 Doug Bell .IP \(bu 4 Daniel Pittman .IP \(bu 4 Stephen Thirlwall .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is copyright (c) 2017 by Jonathan Swartz, David Golden, and Doug Bell. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.