{
    "mode": "perldoc",
    "parameter": "Log::Dispatch::File::Locked",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Log%3A%3ADispatch%3A%3AFile%3A%3ALocked/json",
    "generated": "2026-06-14T05:41:47Z",
    "synopsis": "use Log::Dispatch;\nmy $log = Log::Dispatch->new(\noutputs => [\n[\n'File::Locked',\nminlevel => 'info',\nfilename  => 'Somefile.log',\nmode      => '>>',\nnewline   => 1\n]\n],\n);\n$log->emerg(\"I've fallen and I can't get up\");",
    "sections": {
        "NAME": {
            "content": "Log::Dispatch::File::Locked - Subclass of Log::Dispatch::File to facilitate locking\n",
            "subsections": []
        },
        "VERSION": {
            "content": "version 2.70\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use Log::Dispatch;\n\nmy $log = Log::Dispatch->new(\noutputs => [\n[\n'File::Locked',\nminlevel => 'info',\nfilename  => 'Somefile.log',\nmode      => '>>',\nnewline   => 1\n]\n],\n);\n\n$log->emerg(\"I've fallen and I can't get up\");\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This module acts exactly like Log::Dispatch::File except that it obtains an exclusive lock on\nthe file while opening it.\n\nNote that if you are using this output because you want to write to a file from multiple\nprocesses, you should open the file with the append \"mode\" (\">>\"), or else it's quite likely\nthat one process will overwrite another.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "\"flock\" in perlfunc\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::File::Locked - Subclass of Log::Dispatch::File to facilitate locking",
    "flags": [],
    "examples": [],
    "see_also": []
}