blob: 7d6545a42c6de39eae258a2ab68195e776e3a60f [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) -->
<title>LogManager (Apache Log4j API 2.23.1 API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="declaration: package: org.apache.logging.log4j, class: LogManager">
<meta name="generator" content="javadoc/ClassWriterImpl">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../script-dir/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../jquery-ui.overrides.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
<script type="text/javascript" src="../../../../script-dir/jquery-3.6.1.min.js"></script>
<script type="text/javascript" src="../../../../script-dir/jquery-ui.min.js"></script>
</head>
<body class="class-declaration-page">
<script type="text/javascript">var evenRowColor = "even-row-color";
var oddRowColor = "odd-row-color";
var tableTab = "table-tab";
var activeTableTab = "active-table-tab";
var pathtoroot = "../../../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top">
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="nav-bar-cell1-rev">Class</li>
<li><a href="class-use/LogManager.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html#class">Help</a></li>
</ul>
</div>
<div class="sub-nav">
<div>
<ul class="sub-nav-list">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field-summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor-summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-summary">Method</a></li>
</ul>
<ul class="sub-nav-list">
<li>Detail:&nbsp;</li>
<li><a href="#field-detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor-detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-detail">Method</a></li>
</ul>
</div>
<div class="nav-list-search"><label for="search-input">SEARCH:</label>
<input type="text" id="search-input" value="search" disabled="disabled">
<input type="reset" id="reset-button" value="reset" disabled="disabled">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">org.apache.logging.log4j</a></div>
<h1 title="Class LogManager" class="title">Class LogManager</h1>
</div>
<div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html" title="class or interface in java.lang" class="external-link">java.lang.Object</a>
<div class="inheritance">org.apache.logging.log4j.LogManager</div>
</div>
<section class="class-description" id="class-description">
<hr>
<div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">LogManager</span>
<span class="extends-implements">extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span></div>
<div class="block">The anchor point for the Log4j logging system. The most common usage of this class is to obtain a named
<a href="Logger.html" title="interface in org.apache.logging.log4j"><code>Logger</code></a>. The method <a href="#getLogger()"><code>getLogger()</code></a> is provided as the most convenient way to obtain a named Logger based
on the calling class name. This class also provides method for obtaining named Loggers that use
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html#format-java.lang.String-java.lang.Object...-" title="class or interface in java.lang" class="external-link"><code>String.format(String, Object...)</code></a> style messages instead of the default type of parameterized messages. These
are obtained through the <a href="#getFormatterLogger(java.lang.Object)"><code>getFormatterLogger(Class)</code></a> family of methods. Other service provider methods are
given through the <a href="#getContext()"><code>getContext()</code></a> and <a href="#getFactory()"><code>getFactory()</code></a> family of methods; these methods are not normally
useful for typical usage of Log4j.</div>
</section>
<section class="summary">
<ul class="summary-list">
<!-- =========== FIELD SUMMARY =========== -->
<li>
<section class="field-summary" id="field-summary">
<h2>Field Summary</h2>
<div class="caption"><span>Fields</span></div>
<div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Field</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><code>static final <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second even-row-color"><code><a href="#FACTORY_PROPERTY_NAME" class="member-name-link">FACTORY_PROPERTY_NAME</a></code></div>
<div class="col-last even-row-color">
<div class="block">Log4j property to set to the fully qualified class name of a custom implementation of
<a href="spi/LoggerContextFactory.html" title="interface in org.apache.logging.log4j.spi"><code>LoggerContextFactory</code></a>.</div>
</div>
<div class="col-first odd-row-color"><code>static final <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second odd-row-color"><code><a href="#ROOT_LOGGER_NAME" class="member-name-link">ROOT_LOGGER_NAME</a></code></div>
<div class="col-last odd-row-color">
<div class="block">The name of the root Logger is "".</div>
</div>
</div>
</section>
</li>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<li>
<section class="constructor-summary" id="constructor-summary">
<h2>Constructor Summary</h2>
<div class="caption"><span>Constructors</span></div>
<div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier</div>
<div class="table-header col-second">Constructor</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><code>protected </code></div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E()" class="member-name-link">LogManager</a>()</code></div>
<div class="col-last even-row-color">
<div class="block">Prevents instantiation</div>
</div>
</div>
</section>
</li>
<!-- ========== METHOD SUMMARY =========== -->
<li>
<section class="method-summary" id="method-summary">
<h2>Method Summary</h2>
<div id="method-summary-table">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab1" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab1', 3)" class="table-tab">Static Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel">
<div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#exists(java.lang.String)" class="member-name-link">exists</a><wbr>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Detects if a Logger with the specified name exists.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="spi/LoggerContext.html" title="interface in org.apache.logging.log4j.spi">LoggerContext</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getContext()" class="member-name-link">getContext</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns the current LoggerContext.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="spi/LoggerContext.html" title="interface in org.apache.logging.log4j.spi">LoggerContext</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getContext(boolean)" class="member-name-link">getContext</a><wbr>(boolean&nbsp;currentContext)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns a LoggerContext.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="spi/LoggerContext.html" title="interface in org.apache.logging.log4j.spi">LoggerContext</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getContext(java.lang.ClassLoader,boolean)" class="member-name-link">getContext</a><wbr>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ClassLoader.html" title="class or interface in java.lang" class="external-link">ClassLoader</a>&nbsp;loader,
boolean&nbsp;currentContext)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns a LoggerContext.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="spi/LoggerContext.html" title="interface in org.apache.logging.log4j.spi">LoggerContext</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getContext(java.lang.ClassLoader,boolean,java.lang.Object)" class="member-name-link">getContext</a><wbr>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ClassLoader.html" title="class or interface in java.lang" class="external-link">ClassLoader</a>&nbsp;loader,
boolean&nbsp;currentContext,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;externalContext)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns a LoggerContext.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="spi/LoggerContext.html" title="interface in org.apache.logging.log4j.spi">LoggerContext</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getContext(java.lang.ClassLoader,boolean,java.lang.Object,java.net.URI)" class="member-name-link">getContext</a><wbr>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ClassLoader.html" title="class or interface in java.lang" class="external-link">ClassLoader</a>&nbsp;loader,
boolean&nbsp;currentContext,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;externalContext,
<a href="https://docs.oracle.com/javase/8/docs/api/java/net/URI.html" title="class or interface in java.net" class="external-link">URI</a>&nbsp;configLocation)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns a LoggerContext.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="spi/LoggerContext.html" title="interface in org.apache.logging.log4j.spi">LoggerContext</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getContext(java.lang.ClassLoader,boolean,java.lang.Object,java.net.URI,java.lang.String)" class="member-name-link">getContext</a><wbr>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ClassLoader.html" title="class or interface in java.lang" class="external-link">ClassLoader</a>&nbsp;loader,
boolean&nbsp;currentContext,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;externalContext,
<a href="https://docs.oracle.com/javase/8/docs/api/java/net/URI.html" title="class or interface in java.net" class="external-link">URI</a>&nbsp;configLocation,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns a LoggerContext.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="spi/LoggerContext.html" title="interface in org.apache.logging.log4j.spi">LoggerContext</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getContext(java.lang.ClassLoader,boolean,java.net.URI)" class="member-name-link">getContext</a><wbr>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ClassLoader.html" title="class or interface in java.lang" class="external-link">ClassLoader</a>&nbsp;loader,
boolean&nbsp;currentContext,
<a href="https://docs.oracle.com/javase/8/docs/api/java/net/URI.html" title="class or interface in java.net" class="external-link">URI</a>&nbsp;configLocation)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns a LoggerContext.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>protected static <a href="spi/LoggerContext.html" title="interface in org.apache.logging.log4j.spi">LoggerContext</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getContext(java.lang.String,boolean)" class="member-name-link">getContext</a><wbr>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;fqcn,
boolean&nbsp;currentContext)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns a LoggerContext</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>protected static <a href="spi/LoggerContext.html" title="interface in org.apache.logging.log4j.spi">LoggerContext</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getContext(java.lang.String,java.lang.ClassLoader,boolean)" class="member-name-link">getContext</a><wbr>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;fqcn,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ClassLoader.html" title="class or interface in java.lang" class="external-link">ClassLoader</a>&nbsp;loader,
boolean&nbsp;currentContext)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns a LoggerContext</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>protected static <a href="spi/LoggerContext.html" title="interface in org.apache.logging.log4j.spi">LoggerContext</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getContext(java.lang.String,java.lang.ClassLoader,boolean,java.net.URI,java.lang.String)" class="member-name-link">getContext</a><wbr>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;fqcn,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ClassLoader.html" title="class or interface in java.lang" class="external-link">ClassLoader</a>&nbsp;loader,
boolean&nbsp;currentContext,
<a href="https://docs.oracle.com/javase/8/docs/api/java/net/URI.html" title="class or interface in java.net" class="external-link">URI</a>&nbsp;configLocation,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns a LoggerContext</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="spi/LoggerContextFactory.html" title="interface in org.apache.logging.log4j.spi">LoggerContextFactory</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getFactory()" class="member-name-link">getFactory</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns the current LoggerContextFactory.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="Logger.html" title="interface in org.apache.logging.log4j">Logger</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getFormatterLogger()" class="member-name-link">getFormatterLogger</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns a formatter Logger using the fully qualified name of the calling Class as the Logger name.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="Logger.html" title="interface in org.apache.logging.log4j">Logger</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getFormatterLogger(java.lang.Class)" class="member-name-link">getFormatterLogger</a><wbr>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;?&gt;&nbsp;clazz)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns a formatter Logger using the fully qualified name of the Class as the Logger name.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="Logger.html" title="interface in org.apache.logging.log4j">Logger</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getFormatterLogger(java.lang.Object)" class="member-name-link">getFormatterLogger</a><wbr>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;value)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns a formatter Logger using the fully qualified name of the value's Class as the Logger name.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="Logger.html" title="interface in org.apache.logging.log4j">Logger</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getFormatterLogger(java.lang.String)" class="member-name-link">getFormatterLogger</a><wbr>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns a formatter Logger with the specified name.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="Logger.html" title="interface in org.apache.logging.log4j">Logger</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getLogger()" class="member-name-link">getLogger</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns a Logger with the name of the calling class.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="Logger.html" title="interface in org.apache.logging.log4j">Logger</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getLogger(java.lang.Class)" class="member-name-link">getLogger</a><wbr>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;?&gt;&nbsp;clazz)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns a Logger using the fully qualified name of the Class as the Logger name.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="Logger.html" title="interface in org.apache.logging.log4j">Logger</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getLogger(java.lang.Class,org.apache.logging.log4j.message.MessageFactory)" class="member-name-link">getLogger</a><wbr>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;?&gt;&nbsp;clazz,
<a href="message/MessageFactory.html" title="interface in org.apache.logging.log4j.message">MessageFactory</a>&nbsp;messageFactory)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns a Logger using the fully qualified name of the Class as the Logger name.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="Logger.html" title="interface in org.apache.logging.log4j">Logger</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getLogger(java.lang.Object)" class="member-name-link">getLogger</a><wbr>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;value)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns a Logger using the fully qualified class name of the value as the Logger name.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="Logger.html" title="interface in org.apache.logging.log4j">Logger</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getLogger(java.lang.Object,org.apache.logging.log4j.message.MessageFactory)" class="member-name-link">getLogger</a><wbr>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;value,
<a href="message/MessageFactory.html" title="interface in org.apache.logging.log4j.message">MessageFactory</a>&nbsp;messageFactory)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns a Logger using the fully qualified class name of the value as the Logger name.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="Logger.html" title="interface in org.apache.logging.log4j">Logger</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getLogger(java.lang.String)" class="member-name-link">getLogger</a><wbr>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns a Logger with the specified name.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>protected static <a href="Logger.html" title="interface in org.apache.logging.log4j">Logger</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getLogger(java.lang.String,java.lang.String)" class="member-name-link">getLogger</a><wbr>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;fqcn,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns a Logger with the specified name.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="Logger.html" title="interface in org.apache.logging.log4j">Logger</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getLogger(java.lang.String,org.apache.logging.log4j.message.MessageFactory)" class="member-name-link">getLogger</a><wbr>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name,
<a href="message/MessageFactory.html" title="interface in org.apache.logging.log4j.message">MessageFactory</a>&nbsp;messageFactory)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns a Logger with the specified name.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="Logger.html" title="interface in org.apache.logging.log4j">Logger</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getLogger(org.apache.logging.log4j.message.MessageFactory)" class="member-name-link">getLogger</a><wbr>(<a href="message/MessageFactory.html" title="interface in org.apache.logging.log4j.message">MessageFactory</a>&nbsp;messageFactory)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns a Logger with the name of the calling class.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="Logger.html" title="interface in org.apache.logging.log4j">Logger</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getRootLogger()" class="member-name-link">getRootLogger</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns the root logger.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#setFactory(org.apache.logging.log4j.spi.LoggerContextFactory)" class="member-name-link">setFactory</a><wbr>(<a href="spi/LoggerContextFactory.html" title="interface in org.apache.logging.log4j.spi">LoggerContextFactory</a>&nbsp;factory)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Sets the current LoggerContextFactory to use.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#shutdown()" class="member-name-link">shutdown</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Shutdown using the LoggerContext appropriate for the caller of this method.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#shutdown(boolean)" class="member-name-link">shutdown</a><wbr>(boolean&nbsp;currentContext)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Shutdown the logging system if the logging system supports it.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#shutdown(boolean,boolean)" class="member-name-link">shutdown</a><wbr>(boolean&nbsp;currentContext,
boolean&nbsp;allContexts)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Shutdown the logging system if the logging system supports it.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#shutdown(org.apache.logging.log4j.spi.LoggerContext)" class="member-name-link">shutdown</a><wbr>(<a href="spi/LoggerContext.html" title="interface in org.apache.logging.log4j.spi">LoggerContext</a>&nbsp;context)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Shutdown the logging system if the logging system supports it.</div>
</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-java.lang.Object">Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--" title="class or interface in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-" title="class or interface in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--" title="class or interface in java.lang" class="external-link">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--" title="class or interface in java.lang" class="external-link">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--" title="class or interface in java.lang" class="external-link">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--" title="class or interface in java.lang" class="external-link">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-" title="class or interface in java.lang" class="external-link">wait</a></code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ============ FIELD DETAIL =========== -->
<li>
<section class="field-details" id="field-detail">
<h2>Field Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="FACTORY_PROPERTY_NAME">
<h3>FACTORY_PROPERTY_NAME</h3>
<div class="member-signature"><span class="modifiers">public static final</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name">FACTORY_PROPERTY_NAME</span></div>
<div class="block">Log4j property to set to the fully qualified class name of a custom implementation of
<a href="spi/LoggerContextFactory.html" title="interface in org.apache.logging.log4j.spi"><code>LoggerContextFactory</code></a>.</div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="../../../../constant-values.html#org.apache.logging.log4j.LogManager.FACTORY_PROPERTY_NAME">Constant Field Values</a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="ROOT_LOGGER_NAME">
<h3>ROOT_LOGGER_NAME</h3>
<div class="member-signature"><span class="modifiers">public static final</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name">ROOT_LOGGER_NAME</span></div>
<div class="block">The name of the root Logger is "".</div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="../../../../constant-values.html#org.apache.logging.log4j.LogManager.ROOT_LOGGER_NAME">Constant Field Values</a></li>
</ul>
</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<li>
<section class="constructor-details" id="constructor-detail">
<h2>Constructor Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="&lt;init&gt;()">
<h3>LogManager</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="element-name">LogManager</span>()</div>
<div class="block">Prevents instantiation</div>
</section>
</li>
</ul>
</section>
</li>
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="exists(java.lang.String)">
<h3>exists</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">exists</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name)</span></div>
<div class="block">Detects if a Logger with the specified name exists. This is a convenience method for porting from version 1.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>name</code> - The Logger name to search for.</dd>
<dt>Returns:</dt>
<dd>true if the Logger exists, false otherwise.</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list-long">
<li><a href="spi/LoggerContext.html#hasLogger(java.lang.String)"><code>LoggerContext.hasLogger(String)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getContext()">
<h3>getContext</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="spi/LoggerContext.html" title="interface in org.apache.logging.log4j.spi">LoggerContext</a></span>&nbsp;<span class="element-name">getContext</span>()</div>
<div class="block">Returns the current LoggerContext.
<p>
WARNING - The LoggerContext returned by this method may not be the LoggerContext used to create a Logger for the
calling class.
</p></div>
<dl class="notes">
<dt>Returns:</dt>
<dd>The current LoggerContext.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getContext(boolean)">
<h3>getContext</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="spi/LoggerContext.html" title="interface in org.apache.logging.log4j.spi">LoggerContext</a></span>&nbsp;<span class="element-name">getContext</span><wbr><span class="parameters">(boolean&nbsp;currentContext)</span></div>
<div class="block">Returns a LoggerContext.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>currentContext</code> - if false the LoggerContext appropriate for the caller of this method is returned. For
example, in a web application if the caller is a class in WEB-INF/lib then one LoggerContext may be
returned and if the caller is a class in the container's classpath then a different LoggerContext may
be returned. If true then only a single LoggerContext will be returned.</dd>
<dt>Returns:</dt>
<dd>a LoggerContext.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getContext(java.lang.ClassLoader,boolean)">
<h3>getContext</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="spi/LoggerContext.html" title="interface in org.apache.logging.log4j.spi">LoggerContext</a></span>&nbsp;<span class="element-name">getContext</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ClassLoader.html" title="class or interface in java.lang" class="external-link">ClassLoader</a>&nbsp;loader,
boolean&nbsp;currentContext)</span></div>
<div class="block">Returns a LoggerContext.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>loader</code> - The ClassLoader for the context. If null the context will attempt to determine the appropriate
ClassLoader.</dd>
<dd><code>currentContext</code> - if false the LoggerContext appropriate for the caller of this method is returned. For
example, in a web application if the caller is a class in WEB-INF/lib then one LoggerContext may be
returned and if the caller is a class in the container's classpath then a different LoggerContext may
be returned. If true then only a single LoggerContext will be returned.</dd>
<dt>Returns:</dt>
<dd>a LoggerContext.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getContext(java.lang.ClassLoader,boolean,java.lang.Object)">
<h3>getContext</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="spi/LoggerContext.html" title="interface in org.apache.logging.log4j.spi">LoggerContext</a></span>&nbsp;<span class="element-name">getContext</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ClassLoader.html" title="class or interface in java.lang" class="external-link">ClassLoader</a>&nbsp;loader,
boolean&nbsp;currentContext,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;externalContext)</span></div>
<div class="block">Returns a LoggerContext.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>loader</code> - The ClassLoader for the context. If null the context will attempt to determine the appropriate
ClassLoader.</dd>
<dd><code>currentContext</code> - if false the LoggerContext appropriate for the caller of this method is returned. For
example, in a web application if the caller is a class in WEB-INF/lib then one LoggerContext may be
returned and if the caller is a class in the container's classpath then a different LoggerContext may
be returned. If true then only a single LoggerContext will be returned.</dd>
<dd><code>externalContext</code> - An external context (such as a ServletContext) to be associated with the LoggerContext.</dd>
<dt>Returns:</dt>
<dd>a LoggerContext.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getContext(java.lang.ClassLoader,boolean,java.net.URI)">
<h3>getContext</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="spi/LoggerContext.html" title="interface in org.apache.logging.log4j.spi">LoggerContext</a></span>&nbsp;<span class="element-name">getContext</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ClassLoader.html" title="class or interface in java.lang" class="external-link">ClassLoader</a>&nbsp;loader,
boolean&nbsp;currentContext,
<a href="https://docs.oracle.com/javase/8/docs/api/java/net/URI.html" title="class or interface in java.net" class="external-link">URI</a>&nbsp;configLocation)</span></div>
<div class="block">Returns a LoggerContext.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>loader</code> - The ClassLoader for the context. If null the context will attempt to determine the appropriate
ClassLoader.</dd>
<dd><code>currentContext</code> - if false the LoggerContext appropriate for the caller of this method is returned. For
example, in a web application if the caller is a class in WEB-INF/lib then one LoggerContext may be
returned and if the caller is a class in the container's classpath then a different LoggerContext may
be returned. If true then only a single LoggerContext will be returned.</dd>
<dd><code>configLocation</code> - The URI for the configuration to use.</dd>
<dt>Returns:</dt>
<dd>a LoggerContext.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getContext(java.lang.ClassLoader,boolean,java.lang.Object,java.net.URI)">
<h3>getContext</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="spi/LoggerContext.html" title="interface in org.apache.logging.log4j.spi">LoggerContext</a></span>&nbsp;<span class="element-name">getContext</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ClassLoader.html" title="class or interface in java.lang" class="external-link">ClassLoader</a>&nbsp;loader,
boolean&nbsp;currentContext,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;externalContext,
<a href="https://docs.oracle.com/javase/8/docs/api/java/net/URI.html" title="class or interface in java.net" class="external-link">URI</a>&nbsp;configLocation)</span></div>
<div class="block">Returns a LoggerContext.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>loader</code> - The ClassLoader for the context. If null the context will attempt to determine the appropriate
ClassLoader.</dd>
<dd><code>currentContext</code> - if false the LoggerContext appropriate for the caller of this method is returned. For
example, in a web application if the caller is a class in WEB-INF/lib then one LoggerContext may be
returned and if the caller is a class in the container's classpath then a different LoggerContext may
be returned. If true then only a single LoggerContext will be returned.</dd>
<dd><code>externalContext</code> - An external context (such as a ServletContext) to be associated with the LoggerContext.</dd>
<dd><code>configLocation</code> - The URI for the configuration to use.</dd>
<dt>Returns:</dt>
<dd>a LoggerContext.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getContext(java.lang.ClassLoader,boolean,java.lang.Object,java.net.URI,java.lang.String)">
<h3>getContext</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="spi/LoggerContext.html" title="interface in org.apache.logging.log4j.spi">LoggerContext</a></span>&nbsp;<span class="element-name">getContext</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ClassLoader.html" title="class or interface in java.lang" class="external-link">ClassLoader</a>&nbsp;loader,
boolean&nbsp;currentContext,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;externalContext,
<a href="https://docs.oracle.com/javase/8/docs/api/java/net/URI.html" title="class or interface in java.net" class="external-link">URI</a>&nbsp;configLocation,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name)</span></div>
<div class="block">Returns a LoggerContext.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>loader</code> - The ClassLoader for the context. If null the context will attempt to determine the appropriate
ClassLoader.</dd>
<dd><code>currentContext</code> - if false the LoggerContext appropriate for the caller of this method is returned. For
example, in a web application if the caller is a class in WEB-INF/lib then one LoggerContext may be
returned and if the caller is a class in the container's classpath then a different LoggerContext may
be returned. If true then only a single LoggerContext will be returned.</dd>
<dd><code>externalContext</code> - An external context (such as a ServletContext) to be associated with the LoggerContext.</dd>
<dd><code>configLocation</code> - The URI for the configuration to use.</dd>
<dd><code>name</code> - The LoggerContext name.</dd>
<dt>Returns:</dt>
<dd>a LoggerContext.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getContext(java.lang.String,boolean)">
<h3>getContext</h3>
<div class="member-signature"><span class="modifiers">protected static</span>&nbsp;<span class="return-type"><a href="spi/LoggerContext.html" title="interface in org.apache.logging.log4j.spi">LoggerContext</a></span>&nbsp;<span class="element-name">getContext</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;fqcn,
boolean&nbsp;currentContext)</span></div>
<div class="block">Returns a LoggerContext</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>fqcn</code> - The fully qualified class name of the Class that this method is a member of.</dd>
<dd><code>currentContext</code> - if false the LoggerContext appropriate for the caller of this method is returned. For
example, in a web application if the caller is a class in WEB-INF/lib then one LoggerContext may be
returned and if the caller is a class in the container's classpath then a different LoggerContext may
be returned. If true then only a single LoggerContext will be returned.</dd>
<dt>Returns:</dt>
<dd>a LoggerContext.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getContext(java.lang.String,java.lang.ClassLoader,boolean)">
<h3>getContext</h3>
<div class="member-signature"><span class="modifiers">protected static</span>&nbsp;<span class="return-type"><a href="spi/LoggerContext.html" title="interface in org.apache.logging.log4j.spi">LoggerContext</a></span>&nbsp;<span class="element-name">getContext</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;fqcn,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ClassLoader.html" title="class or interface in java.lang" class="external-link">ClassLoader</a>&nbsp;loader,
boolean&nbsp;currentContext)</span></div>
<div class="block">Returns a LoggerContext</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>fqcn</code> - The fully qualified class name of the Class that this method is a member of.</dd>
<dd><code>loader</code> - The ClassLoader for the context. If null the context will attempt to determine the appropriate
ClassLoader.</dd>
<dd><code>currentContext</code> - if false the LoggerContext appropriate for the caller of this method is returned. For
example, in a web application if the caller is a class in WEB-INF/lib then one LoggerContext may be
returned and if the caller is a class in the container's classpath then a different LoggerContext may
be returned. If true then only a single LoggerContext will be returned.</dd>
<dt>Returns:</dt>
<dd>a LoggerContext.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getContext(java.lang.String,java.lang.ClassLoader,boolean,java.net.URI,java.lang.String)">
<h3>getContext</h3>
<div class="member-signature"><span class="modifiers">protected static</span>&nbsp;<span class="return-type"><a href="spi/LoggerContext.html" title="interface in org.apache.logging.log4j.spi">LoggerContext</a></span>&nbsp;<span class="element-name">getContext</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;fqcn,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ClassLoader.html" title="class or interface in java.lang" class="external-link">ClassLoader</a>&nbsp;loader,
boolean&nbsp;currentContext,
<a href="https://docs.oracle.com/javase/8/docs/api/java/net/URI.html" title="class or interface in java.net" class="external-link">URI</a>&nbsp;configLocation,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name)</span></div>
<div class="block">Returns a LoggerContext</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>fqcn</code> - The fully qualified class name of the Class that this method is a member of.</dd>
<dd><code>loader</code> - The ClassLoader for the context. If null the context will attempt to determine the appropriate
ClassLoader.</dd>
<dd><code>currentContext</code> - if false the LoggerContext appropriate for the caller of this method is returned. For
example, in a web application if the caller is a class in WEB-INF/lib then one LoggerContext may be
returned and if the caller is a class in the container's classpath then a different LoggerContext may
be returned. If true then only a single LoggerContext will be returned.</dd>
<dd><code>configLocation</code> - The URI for the configuration to use.</dd>
<dd><code>name</code> - The LoggerContext name.</dd>
<dt>Returns:</dt>
<dd>a LoggerContext.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="shutdown()">
<h3>shutdown</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">shutdown</span>()</div>
<div class="block">Shutdown using the LoggerContext appropriate for the caller of this method.
This is equivalent to calling <code>LogManager.shutdown(false)</code>.
This call is synchronous and will block until shut down is complete.
This may include flushing pending log events over network connections.</div>
<dl class="notes">
<dt>Since:</dt>
<dd>2.6</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="shutdown(boolean)">
<h3>shutdown</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">shutdown</span><wbr><span class="parameters">(boolean&nbsp;currentContext)</span></div>
<div class="block">Shutdown the logging system if the logging system supports it.
This is equivalent to calling <code>LogManager.shutdown(LogManager.getContext(currentContext))</code>.
This call is synchronous and will block until shut down is complete.
This may include flushing pending log events over network connections.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>currentContext</code> - if true a default LoggerContext (may not be the LoggerContext used to create a Logger
for the calling class) will be used.
If false the LoggerContext appropriate for the caller of this method is used. For
example, in a web application if the caller is a class in WEB-INF/lib then one LoggerContext may be
used and if the caller is a class in the container's classpath then a different LoggerContext may
be used.</dd>
<dt>Since:</dt>
<dd>2.6</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="shutdown(boolean,boolean)">
<h3>shutdown</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">shutdown</span><wbr><span class="parameters">(boolean&nbsp;currentContext,
boolean&nbsp;allContexts)</span></div>
<div class="block">Shutdown the logging system if the logging system supports it.
This is equivalent to calling <code>LogManager.shutdown(LogManager.getContext(currentContext))</code>.
This call is synchronous and will block until shut down is complete.
This may include flushing pending log events over network connections.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>currentContext</code> - if true a default LoggerContext (may not be the LoggerContext used to create a Logger
for the calling class) will be used.
If false the LoggerContext appropriate for the caller of this method is used. For
example, in a web application if the caller is a class in WEB-INF/lib then one LoggerContext may be
used and if the caller is a class in the container's classpath then a different LoggerContext may
be used.</dd>
<dd><code>allContexts</code> - if true all LoggerContexts that can be located will be shutdown.</dd>
<dt>Since:</dt>
<dd>2.13.0</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="shutdown(org.apache.logging.log4j.spi.LoggerContext)">
<h3>shutdown</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">shutdown</span><wbr><span class="parameters">(<a href="spi/LoggerContext.html" title="interface in org.apache.logging.log4j.spi">LoggerContext</a>&nbsp;context)</span></div>
<div class="block">Shutdown the logging system if the logging system supports it.
This call is synchronous and will block until shut down is complete.
This may include flushing pending log events over network connections.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>context</code> - the LoggerContext.</dd>
<dt>Since:</dt>
<dd>2.6</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getFactory()">
<h3>getFactory</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="spi/LoggerContextFactory.html" title="interface in org.apache.logging.log4j.spi">LoggerContextFactory</a></span>&nbsp;<span class="element-name">getFactory</span>()</div>
<div class="block">Returns the current LoggerContextFactory.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>The LoggerContextFactory.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setFactory(org.apache.logging.log4j.spi.LoggerContextFactory)">
<h3>setFactory</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setFactory</span><wbr><span class="parameters">(<a href="spi/LoggerContextFactory.html" title="interface in org.apache.logging.log4j.spi">LoggerContextFactory</a>&nbsp;factory)</span></div>
<div class="block">Sets the current LoggerContextFactory to use. Normally, the appropriate LoggerContextFactory is created at
startup, but in certain environments, a LoggerContextFactory implementation may not be available at this point.
Thus, an alternative LoggerContextFactory can be set at runtime.
<p>
Note that any Logger or LoggerContext objects already created will still be valid, but they will no longer be
accessible through LogManager. Thus, <strong>it is a bad idea to use this method without a good reason</strong>!
Generally, this method should be used only during startup before any code starts caching Logger objects.
</p></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>factory</code> - the LoggerContextFactory to use.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getFormatterLogger()">
<h3>getFormatterLogger</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="Logger.html" title="interface in org.apache.logging.log4j">Logger</a></span>&nbsp;<span class="element-name">getFormatterLogger</span>()</div>
<div class="block">Returns a formatter Logger using the fully qualified name of the calling Class as the Logger name.
<p>
This logger lets you use a <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Formatter.html" title="class or interface in java.util" class="external-link"><code>Formatter</code></a> string in the message to format parameters.
</p></div>
<dl class="notes">
<dt>Returns:</dt>
<dd>The Logger for the calling class.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang" class="external-link">UnsupportedOperationException</a></code> - if the calling class cannot be determined.</dd>
<dt>Since:</dt>
<dd>2.4</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getFormatterLogger(java.lang.Class)">
<h3>getFormatterLogger</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="Logger.html" title="interface in org.apache.logging.log4j">Logger</a></span>&nbsp;<span class="element-name">getFormatterLogger</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;?&gt;&nbsp;clazz)</span></div>
<div class="block">Returns a formatter Logger using the fully qualified name of the Class as the Logger name.
<p>
This logger let you use a <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Formatter.html" title="class or interface in java.util" class="external-link"><code>Formatter</code></a> string in the message to format parameters.
</p>
<p>
Short-hand for <code>getLogger(clazz, StringFormatterMessageFactory.INSTANCE)</code>
</p></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>clazz</code> - The Class whose name should be used as the Logger name.</dd>
<dt>Returns:</dt>
<dd>The Logger, created with a <a href="message/StringFormatterMessageFactory.html" title="class in org.apache.logging.log4j.message"><code>StringFormatterMessageFactory</code></a></dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang" class="external-link">UnsupportedOperationException</a></code> - if <code>clazz</code> is <code>null</code> and the calling class cannot be
determined.</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list-long">
<li><a href="Logger.html#fatal(org.apache.logging.log4j.Marker,java.lang.String,java.lang.Object)"><code>Logger.fatal(Marker, String, Object...)</code></a></li>
<li><a href="Logger.html#fatal(java.lang.String,java.lang.Object)"><code>Logger.fatal(String, Object...)</code></a></li>
<li><a href="Logger.html#error(org.apache.logging.log4j.Marker,java.lang.String,java.lang.Object)"><code>Logger.error(Marker, String, Object...)</code></a></li>
<li><a href="Logger.html#error(java.lang.String,java.lang.Object)"><code>Logger.error(String, Object...)</code></a></li>
<li><a href="Logger.html#warn(org.apache.logging.log4j.Marker,java.lang.String,java.lang.Object)"><code>Logger.warn(Marker, String, Object...)</code></a></li>
<li><a href="Logger.html#warn(java.lang.String,java.lang.Object)"><code>Logger.warn(String, Object...)</code></a></li>
<li><a href="Logger.html#info(org.apache.logging.log4j.Marker,java.lang.String,java.lang.Object)"><code>Logger.info(Marker, String, Object...)</code></a></li>
<li><a href="Logger.html#info(java.lang.String,java.lang.Object)"><code>Logger.info(String, Object...)</code></a></li>
<li><a href="Logger.html#debug(org.apache.logging.log4j.Marker,java.lang.String,java.lang.Object)"><code>Logger.debug(Marker, String, Object...)</code></a></li>
<li><a href="Logger.html#debug(java.lang.String,java.lang.Object)"><code>Logger.debug(String, Object...)</code></a></li>
<li><a href="Logger.html#trace(org.apache.logging.log4j.Marker,java.lang.String,java.lang.Object)"><code>Logger.trace(Marker, String, Object...)</code></a></li>
<li><a href="Logger.html#trace(java.lang.String,java.lang.Object)"><code>Logger.trace(String, Object...)</code></a></li>
<li><a href="message/StringFormatterMessageFactory.html" title="class in org.apache.logging.log4j.message"><code>StringFormatterMessageFactory</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getFormatterLogger(java.lang.Object)">
<h3>getFormatterLogger</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="Logger.html" title="interface in org.apache.logging.log4j">Logger</a></span>&nbsp;<span class="element-name">getFormatterLogger</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;value)</span></div>
<div class="block">Returns a formatter Logger using the fully qualified name of the value's Class as the Logger name.
<p>
This logger let you use a <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Formatter.html" title="class or interface in java.util" class="external-link"><code>Formatter</code></a> string in the message to format parameters.
</p>
<p>
Short-hand for <code>getLogger(value, StringFormatterMessageFactory.INSTANCE)</code>
</p></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>value</code> - The value's whose class name should be used as the Logger name.</dd>
<dt>Returns:</dt>
<dd>The Logger, created with a <a href="message/StringFormatterMessageFactory.html" title="class in org.apache.logging.log4j.message"><code>StringFormatterMessageFactory</code></a></dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang" class="external-link">UnsupportedOperationException</a></code> - if <code>value</code> is <code>null</code> and the calling class cannot be
determined.</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list-long">
<li><a href="Logger.html#fatal(org.apache.logging.log4j.Marker,java.lang.String,java.lang.Object)"><code>Logger.fatal(Marker, String, Object...)</code></a></li>
<li><a href="Logger.html#fatal(java.lang.String,java.lang.Object)"><code>Logger.fatal(String, Object...)</code></a></li>
<li><a href="Logger.html#error(org.apache.logging.log4j.Marker,java.lang.String,java.lang.Object)"><code>Logger.error(Marker, String, Object...)</code></a></li>
<li><a href="Logger.html#error(java.lang.String,java.lang.Object)"><code>Logger.error(String, Object...)</code></a></li>
<li><a href="Logger.html#warn(org.apache.logging.log4j.Marker,java.lang.String,java.lang.Object)"><code>Logger.warn(Marker, String, Object...)</code></a></li>
<li><a href="Logger.html#warn(java.lang.String,java.lang.Object)"><code>Logger.warn(String, Object...)</code></a></li>
<li><a href="Logger.html#info(org.apache.logging.log4j.Marker,java.lang.String,java.lang.Object)"><code>Logger.info(Marker, String, Object...)</code></a></li>
<li><a href="Logger.html#info(java.lang.String,java.lang.Object)"><code>Logger.info(String, Object...)</code></a></li>
<li><a href="Logger.html#debug(org.apache.logging.log4j.Marker,java.lang.String,java.lang.Object)"><code>Logger.debug(Marker, String, Object...)</code></a></li>
<li><a href="Logger.html#debug(java.lang.String,java.lang.Object)"><code>Logger.debug(String, Object...)</code></a></li>
<li><a href="Logger.html#trace(org.apache.logging.log4j.Marker,java.lang.String,java.lang.Object)"><code>Logger.trace(Marker, String, Object...)</code></a></li>
<li><a href="Logger.html#trace(java.lang.String,java.lang.Object)"><code>Logger.trace(String, Object...)</code></a></li>
<li><a href="message/StringFormatterMessageFactory.html" title="class in org.apache.logging.log4j.message"><code>StringFormatterMessageFactory</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getFormatterLogger(java.lang.String)">
<h3>getFormatterLogger</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="Logger.html" title="interface in org.apache.logging.log4j">Logger</a></span>&nbsp;<span class="element-name">getFormatterLogger</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name)</span></div>
<div class="block">Returns a formatter Logger with the specified name.
<p>
This logger let you use a <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Formatter.html" title="class or interface in java.util" class="external-link"><code>Formatter</code></a> string in the message to format parameters.
</p>
<p>
Short-hand for <code>getLogger(name, StringFormatterMessageFactory.INSTANCE)</code>
</p></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>name</code> - The logger name. If null it will default to the name of the calling class.</dd>
<dt>Returns:</dt>
<dd>The Logger, created with a <a href="message/StringFormatterMessageFactory.html" title="class in org.apache.logging.log4j.message"><code>StringFormatterMessageFactory</code></a></dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang" class="external-link">UnsupportedOperationException</a></code> - if <code>name</code> is <code>null</code> and the calling class cannot be determined.</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list-long">
<li><a href="Logger.html#fatal(org.apache.logging.log4j.Marker,java.lang.String,java.lang.Object)"><code>Logger.fatal(Marker, String, Object...)</code></a></li>
<li><a href="Logger.html#fatal(java.lang.String,java.lang.Object)"><code>Logger.fatal(String, Object...)</code></a></li>
<li><a href="Logger.html#error(org.apache.logging.log4j.Marker,java.lang.String,java.lang.Object)"><code>Logger.error(Marker, String, Object...)</code></a></li>
<li><a href="Logger.html#error(java.lang.String,java.lang.Object)"><code>Logger.error(String, Object...)</code></a></li>
<li><a href="Logger.html#warn(org.apache.logging.log4j.Marker,java.lang.String,java.lang.Object)"><code>Logger.warn(Marker, String, Object...)</code></a></li>
<li><a href="Logger.html#warn(java.lang.String,java.lang.Object)"><code>Logger.warn(String, Object...)</code></a></li>
<li><a href="Logger.html#info(org.apache.logging.log4j.Marker,java.lang.String,java.lang.Object)"><code>Logger.info(Marker, String, Object...)</code></a></li>
<li><a href="Logger.html#info(java.lang.String,java.lang.Object)"><code>Logger.info(String, Object...)</code></a></li>
<li><a href="Logger.html#debug(org.apache.logging.log4j.Marker,java.lang.String,java.lang.Object)"><code>Logger.debug(Marker, String, Object...)</code></a></li>
<li><a href="Logger.html#debug(java.lang.String,java.lang.Object)"><code>Logger.debug(String, Object...)</code></a></li>
<li><a href="Logger.html#trace(org.apache.logging.log4j.Marker,java.lang.String,java.lang.Object)"><code>Logger.trace(Marker, String, Object...)</code></a></li>
<li><a href="Logger.html#trace(java.lang.String,java.lang.Object)"><code>Logger.trace(String, Object...)</code></a></li>
<li><a href="message/StringFormatterMessageFactory.html" title="class in org.apache.logging.log4j.message"><code>StringFormatterMessageFactory</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getLogger()">
<h3>getLogger</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="Logger.html" title="interface in org.apache.logging.log4j">Logger</a></span>&nbsp;<span class="element-name">getLogger</span>()</div>
<div class="block">Returns a Logger with the name of the calling class.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>The Logger for the calling class.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang" class="external-link">UnsupportedOperationException</a></code> - if the calling class cannot be determined.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getLogger(java.lang.Class)">
<h3>getLogger</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="Logger.html" title="interface in org.apache.logging.log4j">Logger</a></span>&nbsp;<span class="element-name">getLogger</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;?&gt;&nbsp;clazz)</span></div>
<div class="block">Returns a Logger using the fully qualified name of the Class as the Logger name.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>clazz</code> - The Class whose name should be used as the Logger name. If null it will default to the calling
class.</dd>
<dt>Returns:</dt>
<dd>The Logger.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang" class="external-link">UnsupportedOperationException</a></code> - if <code>clazz</code> is <code>null</code> and the calling class cannot be
determined.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getLogger(java.lang.Class,org.apache.logging.log4j.message.MessageFactory)">
<h3>getLogger</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="Logger.html" title="interface in org.apache.logging.log4j">Logger</a></span>&nbsp;<span class="element-name">getLogger</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;?&gt;&nbsp;clazz,
<a href="message/MessageFactory.html" title="interface in org.apache.logging.log4j.message">MessageFactory</a>&nbsp;messageFactory)</span></div>
<div class="block">Returns a Logger using the fully qualified name of the Class as the Logger name.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>clazz</code> - The Class whose name should be used as the Logger name. If null it will default to the calling
class.</dd>
<dd><code>messageFactory</code> - The message factory is used only when creating a logger, subsequent use does not change the
logger but will log a warning if mismatched.</dd>
<dt>Returns:</dt>
<dd>The Logger.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang" class="external-link">UnsupportedOperationException</a></code> - if <code>clazz</code> is <code>null</code> and the calling class cannot be
determined.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getLogger(org.apache.logging.log4j.message.MessageFactory)">
<h3>getLogger</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="Logger.html" title="interface in org.apache.logging.log4j">Logger</a></span>&nbsp;<span class="element-name">getLogger</span><wbr><span class="parameters">(<a href="message/MessageFactory.html" title="interface in org.apache.logging.log4j.message">MessageFactory</a>&nbsp;messageFactory)</span></div>
<div class="block">Returns a Logger with the name of the calling class.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>messageFactory</code> - The message factory is used only when creating a logger, subsequent use does not change the
logger but will log a warning if mismatched.</dd>
<dt>Returns:</dt>
<dd>The Logger for the calling class.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang" class="external-link">UnsupportedOperationException</a></code> - if the calling class cannot be determined.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getLogger(java.lang.Object)">
<h3>getLogger</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="Logger.html" title="interface in org.apache.logging.log4j">Logger</a></span>&nbsp;<span class="element-name">getLogger</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;value)</span></div>
<div class="block">Returns a Logger using the fully qualified class name of the value as the Logger name.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>value</code> - The value whose class name should be used as the Logger name. If null the name of the calling class
will be used as the logger name.</dd>
<dt>Returns:</dt>
<dd>The Logger.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang" class="external-link">UnsupportedOperationException</a></code> - if <code>value</code> is <code>null</code> and the calling class cannot be
determined.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getLogger(java.lang.Object,org.apache.logging.log4j.message.MessageFactory)">
<h3>getLogger</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="Logger.html" title="interface in org.apache.logging.log4j">Logger</a></span>&nbsp;<span class="element-name">getLogger</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;value,
<a href="message/MessageFactory.html" title="interface in org.apache.logging.log4j.message">MessageFactory</a>&nbsp;messageFactory)</span></div>
<div class="block">Returns a Logger using the fully qualified class name of the value as the Logger name.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>value</code> - The value whose class name should be used as the Logger name. If null the name of the calling class
will be used as the logger name.</dd>
<dd><code>messageFactory</code> - The message factory is used only when creating a logger, subsequent use does not change the
logger but will log a warning if mismatched.</dd>
<dt>Returns:</dt>
<dd>The Logger.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang" class="external-link">UnsupportedOperationException</a></code> - if <code>value</code> is <code>null</code> and the calling class cannot be
determined.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getLogger(java.lang.String)">
<h3>getLogger</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="Logger.html" title="interface in org.apache.logging.log4j">Logger</a></span>&nbsp;<span class="element-name">getLogger</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name)</span></div>
<div class="block">Returns a Logger with the specified name.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>name</code> - The logger name. If null the name of the calling class will be used.</dd>
<dt>Returns:</dt>
<dd>The Logger.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang" class="external-link">UnsupportedOperationException</a></code> - if <code>name</code> is <code>null</code> and the calling class cannot be determined.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getLogger(java.lang.String,org.apache.logging.log4j.message.MessageFactory)">
<h3>getLogger</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="Logger.html" title="interface in org.apache.logging.log4j">Logger</a></span>&nbsp;<span class="element-name">getLogger</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name,
<a href="message/MessageFactory.html" title="interface in org.apache.logging.log4j.message">MessageFactory</a>&nbsp;messageFactory)</span></div>
<div class="block">Returns a Logger with the specified name.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>name</code> - The logger name. If null the name of the calling class will be used.</dd>
<dd><code>messageFactory</code> - The message factory is used only when creating a logger, subsequent use does not change the
logger but will log a warning if mismatched.</dd>
<dt>Returns:</dt>
<dd>The Logger.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang" class="external-link">UnsupportedOperationException</a></code> - if <code>name</code> is <code>null</code> and the calling class cannot be determined.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getLogger(java.lang.String,java.lang.String)">
<h3>getLogger</h3>
<div class="member-signature"><span class="modifiers">protected static</span>&nbsp;<span class="return-type"><a href="Logger.html" title="interface in org.apache.logging.log4j">Logger</a></span>&nbsp;<span class="element-name">getLogger</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;fqcn,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name)</span></div>
<div class="block">Returns a Logger with the specified name.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>fqcn</code> - The fully qualified class name of the class that this method is a member of.</dd>
<dd><code>name</code> - The logger name.</dd>
<dt>Returns:</dt>
<dd>The Logger.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getRootLogger()">
<h3>getRootLogger</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="Logger.html" title="interface in org.apache.logging.log4j">Logger</a></span>&nbsp;<span class="element-name">getRootLogger</span>()</div>
<div class="block">Returns the root logger.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the root logger, named <a href="#ROOT_LOGGER_NAME"><code>ROOT_LOGGER_NAME</code></a>.</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
<footer role="contentinfo">
<hr>
<p class="legal-copy"><small><p align="center"> Copyright &copy; 1999-2024 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.<br/> Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation. </p></small></p>
</footer>
</div>
</div>
</body>
</html>