title: What are markers in Java Logging frameworks and what is a reason to use them?
body: <p>The first time I heard about markers was while reading:</p>
  <p><a href="http://slf4j.org/faq.html" rel="noreferrer">http://slf4j.org/faq.html</a></p>
  <p>I checked available methods for the <strong>Logger</strong> object:</p>
  <ul>
  <li><a href="http://www.slf4j.org/api/org/slf4j/Logger.html" rel="noreferrer">http://www.slf4j.org/api/org/slf4j/Logger.html</a></li>
  <li><a href="http://logging.apache.org/log4j/2.x/log4j-api/apidocs/org/apache/logging/log4j/Logger.html" rel="noreferrer">http://logging.apache.org/log4j/2.x/log4j-api/apidocs/org/apache/logging/log4j/Logger.html</a></li>
  </ul>
  <p>and found interfaces:</p>
  <ul>
  <li><a href="http://www.slf4j.org/api/org/slf4j/Marker.html" rel="noreferrer">http://www.slf4j.org/api/org/slf4j/Marker.html</a></li>
  <li><a href="http://logging.apache.org/log4j/2.x/log4j-api/apidocs/org/apache/logging/log4j/Marker.html" rel="noreferrer">http://logging.apache.org/log4j/2.x/log4j-api/apidocs/org/apache/logging/log4j/Marker.html</a></li>
  </ul>
  <p>The more in-depth info I got from:</p>
  <ul>
  <li><a href="http://logback.qos.ch/manual/filters.html" rel="noreferrer">http://logback.qos.ch/manual/filters.html</a></li>
  </ul>
  <p>but I am still confused... Note that I asked <em>why</em>, not <em>how</em> to use them, so this is not a duplicate of:</p>
  <ul>
  <li><a href="https://stackoverflow.com/questions/4165558/best-practices-for-using-markers-in-slf4j-logback">Best practices for using Markers in SLF4J/Logback</a></li>
  </ul>
  <p><strong>UPDATE</strong> Seems that when you use markers you are also required to write custom Java code instead doing configuration in <em>XML</em> or <em>.property</em> files...</p>
  <p><strong>UPDATE 2</strong> From <a href="http://logback.qos.ch/manual/appenders.html#OnMarkerEvaluator" rel="noreferrer">http://logback.qos.ch/manual/appenders.html#OnMarkerEvaluator</a></p>
  <pre><code>Marker notifyAdmin = MarkerFactory.getMarker(&quot;NOTIFY_ADMIN&quot;);
  logger.error(notifyAdmin,
    &quot;This is a serious an error requiring the admin's attention&quot;,
     new Exception(&quot;Just testing&quot;));
  </code></pre>