{
    "mode": "perldoc",
    "parameter": "Log::Dispatch::Syslog",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Log%3A%3ADispatch%3A%3ASyslog/json",
    "generated": "2026-06-13T02:57:14Z",
    "synopsis": "use Log::Dispatch;\nmy $log = Log::Dispatch->new(\noutputs => [\n[\n'Syslog',\nminlevel => 'info',\nident     => 'Yadda yadda'\n]\n]\n);\n$log->emerg(\"Time to die.\");",
    "sections": {
        "NAME": {
            "content": "Log::Dispatch::Syslog - Object for logging to system log.\n",
            "subsections": []
        },
        "VERSION": {
            "content": "version 2.70\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use Log::Dispatch;\n\nmy $log = Log::Dispatch->new(\noutputs => [\n[\n'Syslog',\nminlevel => 'info',\nident     => 'Yadda yadda'\n]\n]\n);\n\n$log->emerg(\"Time to die.\");\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This module provides a simple object for sending messages to the system log (via UNIX syslog\ncalls).\n\nNote that logging may fail if you try to pass UTF-8 characters in the log message. If logging\nfails and warnings are enabled, the error message will be output using Perl's \"warn\".\n",
            "subsections": []
        },
        "CONSTRUCTOR": {
            "content": "The constructor takes the following parameters in addition to the standard parameters documented\nin Log::Dispatch::Output:\n\n*   ident ($)\n\nThis string will be prepended to all messages in the system log. Defaults to $0.\n\n*   logopt ($)\n\nA string containing the log options (separated by any separator you like). See the\nopenlog(3) and Sys::Syslog docs for more details. Defaults to ''.\n\n*   facility ($)\n\nSpecifies what type of program is doing the logging to the system log. Valid options are\n'auth', 'authpriv', 'cron', 'daemon', 'kern', 'local0' through 'local7', 'mail, 'news',\n'syslog', 'user', 'uucp'. Defaults to 'user'\n\n*   socket ($, \\@, or \\%)\n\nTells what type of socket to use for sending syslog messages. Valid options are listed in\n\"Sys::Syslog\".\n\nIf you don't provide this, then we let \"Sys::Syslog\" simply pick one that works, which is\nthe preferred option, as it makes your code more portable.\n\nIf you pass an array reference, it is dereferenced and passed to\n\"Sys::Syslog::setlogsock()\".\n\nIf you pass a hash reference, it is passed to \"Sys::Syslog::setlogsock()\" as is.\n\n*   lock ($)\n\nIf this is set to a true value, then the calls to \"setlogsock()\", \"openlog()\", \"syslog()\",\nand \"closelog()\" will all be guarded by a thread-locked variable.\n\nThis is only relevant when running you are using Perl threads in your application. Setting\nthis to a true value will cause the threads and threads::shared modules to be loaded.\n\nThis defaults to false.\n",
            "subsections": []
        },
        "SUPPORT": {
            "content": "Bugs may be submitted at <https://github.com/houseabsolute/Log-Dispatch/issues>.\n\nI am also usually active on IRC as 'autarch' on \"irc://irc.perl.org\".\n",
            "subsections": []
        },
        "SOURCE": {
            "content": "The source code repository for Log-Dispatch can be found at\n<https://github.com/houseabsolute/Log-Dispatch>.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Dave Rolsky <autarch@urth.org>\n",
            "subsections": []
        },
        "COPYRIGHT AND LICENSE": {
            "content": "This software is Copyright (c) 2020 by Dave Rolsky.\n\nThis is free software, licensed under:\n\nThe Artistic License 2.0 (GPL Compatible)\n\nThe full text of the license can be found in the LICENSE file included with this distribution.\n",
            "subsections": []
        }
    },
    "summary": "Log::Dispatch::Syslog - Object for logging to system log.",
    "flags": [],
    "examples": [],
    "see_also": []
}