Log::Di...::Syslog(3)
okay bestie, welcome to Log::Di...::Syslog(3) β the User Contributed Perl Documentation page for this little syslog moment β¨
πΈ NAME πΈ
Log::Dispatch::Syslog β object for logging to system log. π
π VERSION π
version 2.71 β that's the version vibe check, no cap.
β¨ SYNOPSIS β¨
use Log::Dispatch;
my $log = Log::Dispatch->new(
outputs => [
[
'Syslog',
min_level => 'info',
ident => 'Yadda yadda'
]
]
);
$log->emerg("Time to die.");
π¦ DESCRIPTION π¦
This module is your simple object for sending messages to the system log (via UNIX syslog calls). π«Ά
Note that logging may fail if you try to pass UTF-8 characters in the log message. If logging fails and warnings are enabled, the error message will be output using Perl's warn. π
π CONSTRUCTOR π
The constructor takes the following parameters in addition to the standard parameters documented in Log::Dispatch::Output:
ident ($)β this string will be prepended to all messages in the system log. Defaults to$0.logopt ($)β a string containing the log options (separated by any separator you like). See theopenlog(3)andSys::Syslogdocs for more details. Defaults to''.facility ($)β specifies what type of program is doing the logging to the system log. Valid options are'auth','authpriv','cron','daemon','kern','local0'through'local7','mail, 'news','syslog','user','uucp'. Defaults to'user'.socket ($, \@, or \%)β tells what type of socket to use for sending syslog messages. Valid options are listed in"Sys::Syslog".
If you don't provide this, then we let Sys::Syslog simply pick one that works, which is the preferred option, as it makes your code more portable. π¦
If you pass an array reference, it is dereferenced and passed to Sys::Syslog::setlogsock().
If you pass a hash reference, it is passed to Sys::Syslog::setlogsock() as is.
lock ($)β if this is set to a true value, then the calls tosetlogsock(),openlog(),syslog(), andcloselog()will all be guarded by a thread-locked variable.
This is only relevant when running you are using Perl threads in your application. Setting this to a true value will cause the threads and threads::shared modules to be loaded.
This defaults to false.
π SUPPORT π
Bugs may be submitted at https://github.com/houseabsolute/Log-Dispatch/issues.
π SOURCE π
The source code repository for Log-Dispatch can be found at https://github.com/houseabsolute/Log-Dispatch.
π AUTHOR π
Dave Rolsky β <autarch@urth.org>
π COPYRIGHT AND LICENSE π
This software is Copyright (c) 2023 by Dave Rolsky.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
The full text of the license can be found in the LICENSE file included with this distribution.
π and that's the whole page, bestie β the footer said perl v5.42.0, dated 2023-04-21, for Log::Di...::Syslog(3). bye! π«Ά
π¦ where this page comes from
- opensuse-leap 16.0: perl-Log-Dispatch 2.71-bp160.1.2 Β· Artistic-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms