{
    "content": [
        {
            "type": "text",
            "text": "# Log::Log4perl::Appender::Buffer (perldoc)\n\n## NAME\n\nLog::Log4perl::Appender::Buffer - Buffering Appender\n\n## SYNOPSIS\n\nuse Log::Log4perl qw(:easy);\nmy $conf = qq(\nlog4perl.category                  = DEBUG, Buffer\n# Regular Screen Appender\nlog4perl.appender.Screen           = Log::Log4perl::Appender::Screen\nlog4perl.appender.Screen.stdout    = 1\nlog4perl.appender.Screen.layout    = PatternLayout\nlog4perl.appender.Screen.layout.ConversionPattern = %d %p %c %m %n\n# Buffering appender, using the appender above as outlet\nlog4perl.appender.Buffer               = Log::Log4perl::Appender::Buffer\nlog4perl.appender.Buffer.appender      = Screen\nlog4perl.appender.Buffer.triggerlevel = ERROR\n);\nLog::Log4perl->init(\\$conf);\nDEBUG(\"This message gets buffered.\");\nINFO(\"This message gets buffered also.\");\n# Time passes. Nothing happens. But then ...\nprint \"It's GO time!!!\\n\";\nERROR(\"This message triggers a buffer flush.\");\n\n## DESCRIPTION\n\n\"Log::Log4perl::Appender::Buffer\" takes these arguments:\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **DEVELOPMENT NOTES**\n- **LICENSE**\n- **AUTHOR**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Log::Log4perl::Appender::Buffer",
        "section": "",
        "mode": "perldoc",
        "summary": "Log::Log4perl::Appender::Buffer - Buffering Appender",
        "synopsis": "use Log::Log4perl qw(:easy);\nmy $conf = qq(\nlog4perl.category                  = DEBUG, Buffer\n# Regular Screen Appender\nlog4perl.appender.Screen           = Log::Log4perl::Appender::Screen\nlog4perl.appender.Screen.stdout    = 1\nlog4perl.appender.Screen.layout    = PatternLayout\nlog4perl.appender.Screen.layout.ConversionPattern = %d %p %c %m %n\n# Buffering appender, using the appender above as outlet\nlog4perl.appender.Buffer               = Log::Log4perl::Appender::Buffer\nlog4perl.appender.Buffer.appender      = Screen\nlog4perl.appender.Buffer.triggerlevel = ERROR\n);\nLog::Log4perl->init(\\$conf);\nDEBUG(\"This message gets buffered.\");\nINFO(\"This message gets buffered also.\");\n# Time passes. Nothing happens. But then ...\nprint \"It's GO time!!!\\n\";\nERROR(\"This message triggers a buffer flush.\");",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 28,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 44,
                "subsections": []
            },
            {
                "name": "DEVELOPMENT NOTES",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "LICENSE",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 17,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Log::Log4perl::Appender::Buffer - Buffering Appender\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use Log::Log4perl qw(:easy);\n\nmy $conf = qq(\nlog4perl.category                  = DEBUG, Buffer\n\n# Regular Screen Appender\nlog4perl.appender.Screen           = Log::Log4perl::Appender::Screen\nlog4perl.appender.Screen.stdout    = 1\nlog4perl.appender.Screen.layout    = PatternLayout\nlog4perl.appender.Screen.layout.ConversionPattern = %d %p %c %m %n\n\n# Buffering appender, using the appender above as outlet\nlog4perl.appender.Buffer               = Log::Log4perl::Appender::Buffer\nlog4perl.appender.Buffer.appender      = Screen\nlog4perl.appender.Buffer.triggerlevel = ERROR\n);\n\nLog::Log4perl->init(\\$conf);\n\nDEBUG(\"This message gets buffered.\");\nINFO(\"This message gets buffered also.\");\n\n# Time passes. Nothing happens. But then ...\n\nprint \"It's GO time!!!\\n\";\n\nERROR(\"This message triggers a buffer flush.\");\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "\"Log::Log4perl::Appender::Buffer\" takes these arguments:\n\n\"appender\"\nSpecifies the name of the appender it buffers messages for. The appender specified must be\ndefined somewhere in the configuration file, not necessarily before the definition of\n\"Log::Log4perl::Appender::Buffer\".\n\n\"maxmessages\"\nSpecifies the maximum number of messages the appender will hold in its ring buffer.\n\"maxmessages\" is optional. By default, \"Log::Log4perl::Appender::Buffer\" will *not* limit\nthe number of messages buffered. This might be undesirable in long-running processes\naccumulating lots of messages before a flush happens. If \"maxmessages\" is set to a numeric\nvalue, \"Log::Log4perl::Appender::Buffer\" will displace old messages in its buffer to make\nroom if the buffer is full.\n\n\"triggerlevel\"\nIf triggerlevel is set to one of Log4perl's levels (see Log::Log4perl::Level), a \"trigger\"\nfunction will be defined internally to flush the buffer if a message with a priority of\n$level or higher comes along. This is just a convenience function. Defining\n\nlog4perl.appender.Buffer.triggerlevel = ERROR\n\nis equivalent to creating a trigger function like\n\nlog4perl.appender.Buffer.trigger = sub {   \\\nmy($self, $params) = @;               \\\nreturn $params->{log4plevel} >=       \\\n$Log::Log4perl::Level::ERROR; }\n\nSee the next section for defining generic trigger functions.\n\n\"trigger\"\n\"trigger\" holds a reference to a subroutine, which \"Log::Log4perl::Appender::Buffer\" will\ncall on every incoming message with the same parameters as the appender's \"log()\" method:\n\nmy($self, $params) = @;\n\n$params references a hash containing the message priority (key \"l4plevel\"), the message\ncategory (key \"l4pcategory\") and the content of the message (key \"message\").\n\nIf the subroutine returns 1, it will trigger a flush of buffered messages.\n\nShortcut\n",
                "subsections": []
            },
            "DEVELOPMENT NOTES": {
                "content": "\"Log::Log4perl::Appender::Buffer\" is a *composite* appender. Unlike other appenders, it doesn't\nlog any messages, it just passes them on to its attached sub-appender. For this reason, it\ndoesn't need a layout (contrary to regular appenders). If it defines none, messages are passed\non unaltered.\n\nCustom filters are also applied to the composite appender only. They are *not* applied to the\nsub-appender. Same applies to appender thresholds. This behaviour might change in the future.\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": []
            }
        }
    }
}