[SDC-29] Amdocs OnBoard 1707 initial commit.
[sdc.git] / common / openecomp-logging-lib / openecomp-logging-core / src / main / java / org / openecomp / core / logging / Markers.java
1 package org.openecomp.core.logging;
2
3 import org.slf4j.Marker;
4 import org.slf4j.MarkerFactory;
5
6 /**
7  * <p>The list of markers that can be used for special logging such as metrics, audit, etc.</p>
8  * <p>Although markers can be easily instantiated whenever needed, having constants for them helps
9  * eliminate mistakes - misspelling, using a marker that is not handled, etc.</p> <p>Usage:</p>
10  * <pre>
11  *     Logger log = LogFactory.getLogger(this.getClass());
12  *     log.info(Markers.AUDIT, "User '{}' logged out", user);
13  * </pre>
14  *
15  * @see org.slf4j.Marker
16  */
17 public class Markers {
18
19   public static final Marker AUDIT = MarkerFactory.getMarker("AUDIT");
20   public static final Marker METRICS = MarkerFactory.getMarker("METRICS");
21 }