/** * Return a Marker instance as specified by the name parameter using the * previously bound {@link IMarkerFactory}instance. * * @param name * The name of the {@link Marker} object to return. * @return marker */ public static Marker getMarker(String name) { return MARKER_FACTORY.getMarker(name); }
/** * Return a Marker instance as specified by the name parameter using the * previously bound {@link IMarkerFactory}instance. * * @param name * The name of the {@link Marker} object to return. * @return marker */ public static Marker getMarker(String name) { return MARKER_FACTORY.getMarker(name); }
@Override public Iterator<Marker> iterator() { final org.apache.logging.log4j.Marker[] log4jParents = this.marker.getParents(); final List<Marker> parents = new ArrayList<>(log4jParents.length); for (final org.apache.logging.log4j.Marker m : log4jParents) { parents.add(factory.getMarker(m.getName())); } return parents.iterator(); }
@Override public void add(final Marker marker) { if (marker == null) { throw new IllegalArgumentException(); } final Marker m = factory.getMarker(marker.getName()); this.marker.addParents(((Log4jMarker)m).getLog4jMarker()); }
/** * Return a Marker instance as specified by the name parameter using the * previously bound {@link IMarkerFactory}instance. * * @param name * The name of the {@link Marker} object to return. * @return marker */ public static Marker getMarker(String name) { return markerFactory.getMarker(name); }
/** * Return a Marker instance as specified by the name parameter using the * previously bound {@link IMarkerFactory}instance. * * @param name * The name of the {@link Marker} object to return. * @return marker */ public static Marker getMarker(String name) { return MARKER_FACTORY.getMarker(name); }
/** * Return a Marker instance as specified by the name parameter using the * previously bound {@link IMarkerFactory}instance. * * @param name * The name of the {@link Marker} object to return. * @return marker */ public static Marker getMarker(String name) { return markerFactory.getMarker(name); }
/** * Return a Marker instance as specified by the name parameter using the * previously bound {@link IMarkerFactory}instance. * * @param name * The name of the {@link Marker} object to return. * @return marker */ public static Marker getMarker(String name) { return MARKER_FACTORY.getMarker(name); }
/** * Return a Marker instance as specified by the name parameter using the * previously bound {@link IMarkerFactory}instance. * * @param name * The name of the {@link Marker} object to return. * @return marker */ public static Marker getMarker(String name) { return markerFactory.getMarker(name); }
/** * Return a Marker instance as specified by the name parameter using the * previously bound {@link IMarkerFactory}instance. * * @param name * The name of the {@link Marker} object to return. * @return marker */ public static Marker getMarker(String name) { return MARKER_FACTORY.getMarker(name); }
/** * Return a Marker instance as specified by the name parameter using the * previously bound {@link IMarkerFactory}instance. * * @param name * The name of the {@link Marker} object to return. * @return marker */ public static Marker getMarker(String name) { return MARKER_FACTORY.getMarker(name); }
/** * Return a Marker instance as specified by the name parameter using the * previously bound {@link IMarkerFactory}instance. * * @param name * The name of the {@link Marker} object to return. * @return marker */ public static Marker getMarker(String name) { return markerFactory.getMarker(name); }
/** * Return a Marker instance as specified by the name parameter using the * previously bound {@link IMarkerFactory}instance. * * @param name * The name of the {@link Marker} object to return. * @return marker */ public static Marker getMarker(String name) { return MARKER_FACTORY.getMarker(name); }
/** * Return a Marker instance as specified by the name parameter using the * previously bound {@link IMarkerFactory}instance. * * @param name * The name of the {@link Marker} object to return. * @return marker */ public static Marker getMarker(String name) { return MARKER_FACTORY.getMarker(name); }
@Override public Iterator<Marker> iterator() { final org.apache.logging.log4j.Marker[] log4jParents = this.marker.getParents(); final List<Marker> parents = new ArrayList<>(log4jParents.length); for (final org.apache.logging.log4j.Marker m : log4jParents) { parents.add(factory.getMarker(m.getName())); } return parents.iterator(); }
public boolean contains(String name) { if(name == null) { return false; } if(factory.exists(name)) { Marker other = factory.getMarker(name); return contains(other); } else { return false; } }
@Override public void add(final Marker marker) { if (marker == null) { throw new IllegalArgumentException(); } final Marker m = factory.getMarker(marker.getName()); this.marker.addParents(((Log4jMarker)m).getLog4jMarker()); }
@Test public void testWithSeveralChildMarker() { Marker marker = markerFactory.getMarker("testParent"); marker.add(markerFactory.getMarker("child1")); marker.add(markerFactory.getMarker("child2")); marker.add(markerFactory.getMarker("child3")); String result = converter.convert(createLoggingEvent(marker)); assertEquals("testParent [ child1, child2, child3 ]", result); }
@Test public void testWithMarker() { String name = "test"; Marker marker = markerFactory.getMarker(name); String result = converter.convert(createLoggingEvent(marker)); assertEquals(name, result); }