{
    "mode": "perldoc",
    "parameter": "Log::Log4perl::Appender::Screen",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Log%3A%3ALog4perl%3A%3AAppender%3A%3AScreen/json",
    "generated": "2026-10-22T12:26:23Z",
    "synopsis": "use Log::Log4perl::Appender::Screen;\nmy $app = Log::Log4perl::Appender::Screen->new(\nautoflush => 1,\nstderr    => 0,\nutf8      => 1,\n);\n$file->log(message => \"Log me\\n\");",
    "sections": {
        "NAME": {
            "content": "Log::Log4perl::Appender::Screen - Log to STDOUT/STDERR\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use Log::Log4perl::Appender::Screen;\n\nmy $app = Log::Log4perl::Appender::Screen->new(\nautoflush => 1,\nstderr    => 0,\nutf8      => 1,\n);\n\n$file->log(message => \"Log me\\n\");\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This is a simple appender for writing to STDOUT or STDERR.\n\nThe constructor new() takes an optional parameter \"stderr\":\n\n*   If set to a false value, it will log all levels to STDOUT (or, more accurately, whichever\nfile handle is selected via select(), STDOUT by default).\n\n*   If set to a hash, then any \"log4plevel\" with a truthy value will dynamically use STDERR, or\nSTDOUT otherwise.\n\n*   Otherwise, if a true value (the default setting is 1), messages will be logged to STDERR.\n\n# All messages/levels to STDERR\nmy $app = Log::Log4perl::Appender::Screen->new(\nstderr  => 1,\n);\n\n# Only ERROR and FATAL to STDERR (case-sensitive)\nmy $app = Log::Log4perl::Appender::Screen->new(\nstderr  => { ERROR => 1, FATAL => 1},\n);\n\nDesign and implementation of this module has been greatly inspired by Dave Rolsky's\n\"Log::Dispatch\" appender framework.\n\nTo enable printing wide utf8 characters, set the utf8 option to a true value:\n\nmy $app = Log::Log4perl::Appender::Screen->new(\nstderr    => 1,\nutf8      => 1,\n);\n\nThis will issue the necessary binmode command to the selected output channel (stderr/stdout).\n\nTo enable autoflush, set the \"autoflush\" option to a true value:\n\nmy $app = Log::Log4perl::Appender::Screen->new(\nautoflush => 1,\n);\n\nThis will issue the necessary autoflush command to the selected output channel (stderr/stdout).\n\nThis is required in containers, especially when the log volume is low, to not buffer the log\nmessages and cause a significant delay.\n",
            "subsections": []
        },
        "LICENSE": {
            "content": "Copyright 2002-2013 by Mike Schilli <m@perlmeister.com> and Kevin Goess <cpan@goess.org>.\n\nThis library is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Please contribute patches to the project on Github:\n\nhttp://github.com/mschilli/log4perl\n\nSend bug reports or requests for enhancements to the authors via our\n\nMAILING LIST (questions, bug reports, suggestions/patches): log4perl-devel@lists.sourceforge.net\n\nAuthors (please contact them via the list above, not directly): Mike Schilli\n<m@perlmeister.com>, Kevin Goess <cpan@goess.org>\n\nContributors (in alphabetical order): Ateeq Altaf, Cory Bennett, Jens Berthold, Jeremy Bopp,\nHutton Davidson, Chris R. Donnelly, Matisse Enzer, Hugh Esco, Anthony Foiani, James FitzGibbon,\nCarl Franks, Dennis Gregorovic, Andy Grundman, Paul Harrington, Alexander Hartmaier David Hull,\nRobert Jacobson, Jason Kohles, Jeff Macdonald, Markus Peter, Brett Rann, Peter Rabbitson, Erik\nSelberg, Aaron Straup Cope, Lars Thegler, David Viner, Mac Yang.\n",
            "subsections": []
        }
    },
    "summary": "Log::Log4perl::Appender::Screen - Log to STDOUT/STDERR",
    "flags": [],
    "examples": [],
    "see_also": []
}