{
    "mode": "perldoc",
    "parameter": "Log::Log4perl::MDC",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Log%3A%3ALog4perl%3A%3AMDC/json",
    "generated": "2026-06-10T16:27:53Z",
    "sections": {
        "NAME": {
            "content": "Log::Log4perl::MDC - Mapped Diagnostic Context\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Log::Log4perl allows loggers to maintain global thread-specific data, called the Nested\nDiagnostic Context (NDC) and Mapped Diagnostic Context (MDC).\n\nThe MDC is a simple thread-specific hash table, in which the application can stuff values under\ncertain keys and retrieve them later via the \"%X{key}\" placeholder in\n\"Log::Log4perl::Layout::PatternLayout\"s.\n\nLog::Log4perl::MDC->put($key, $value);\nStore a value $value under key $key in the map.\n\nmy $value = Log::Log4perl::MDC->get($key);\nRetrieve the content of the map under the specified key. Typically done by %X{key} in\n\"Log::Log4perl::Layout::PatternLayout\". If no value exists to the given key, \"undef\" is\nreturned.\n\nmy $text = Log::Log4perl::MDC->remove();\nDelete all entries from the map.\n\nLog::Log4perl::MDC->getcontext();\nReturns a reference to the hash table.\n\nPlease note that all of the methods above are class methods, there's no instances of this class.\nSince the thread model in perl 5.8.0 is \"no shared data unless explicitly requested\" the data\nstructures used are just global (and therefore thread-specific).\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::MDC - Mapped Diagnostic Context",
    "flags": [],
    "examples": [],
    "see_also": []
}