String getFullyQualifiedName(LoggingEvent event) { return event.getLocationInformation().getClassName(); } }
/** * {@inheritDoc} */ public Logger getLogger(final String name) { return new NOPLogger(this, name); }
/** The root category names itself as "root". However, the root category cannot be retrieved by name. */ public RootCategory(Level level) { super("root"); setLevel(level); }
public String convert(LoggingEvent event) { LocationInfo locationInfo = event.getLocationInformation(); switch(type) { case FULL_LOCATION_CONVERTER: return locationInfo.fullInfo; case METHOD_LOCATION_CONVERTER: return locationInfo.getMethodName(); case LINE_LOCATION_CONVERTER: return locationInfo.getLineNumber(); case FILE_LOCATION_CONVERTER: return locationInfo.getFileName(); default: return null; } } }
/** Return the message for this logging event. <p>Before serialization, the returned object is the message passed by the user to generate the logging event. After serialization, the returned value equals the String form of the message possibly after object rendering. @since 1.1 */ public Object getMessage() { if(message != null) { return message; } else { return getRenderedMessage(); } }
/** * {@inheritDoc} */ public void format(final LoggingEvent event, final StringBuffer output) { LocationInfo locationInfo = event.getLocationInformation(); if (locationInfo != null) { output.append(locationInfo.getLineNumber()); } } }
/** * {@inheritDoc} */ public void format(final LoggingEvent event, final StringBuffer toAppendTo) { LocationInfo locationInfo = event.getLocationInformation(); if (locationInfo != null) { toAppendTo.append(locationInfo.getMethodName()); } } }
String getFullyQualifiedName(LoggingEvent event) { return event.getLoggerName(); } }
/** * {@inheritDoc} */ public void format(final LoggingEvent event, final StringBuffer output) { LocationInfo locationInfo = event.getLocationInformation(); if (locationInfo != null) { output.append(locationInfo.getFileName()); } } }
/** Return this event's throwable's string[] representaion. */ public String[] getThrowableStrRep() { if(throwableInfo == null) return null; else return throwableInfo.getThrowableStrRep(); }
private void readObject(ObjectInputStream ois) throws java.io.IOException, ClassNotFoundException { ois.defaultReadObject(); readLevel(ois); // Make sure that no location info is available to Layouts if(locationInfo == null) locationInfo = new LocationInfo(null, null); }
public void activate() { if (obj instanceof OptionHandler) { ((OptionHandler) obj).activateOptions(); } } }
/** Add a filter to end of the filter list. @since 0.9.0 */ public void addFilter(Filter newFilter) { if(headFilter == null) { headFilter = tailFilter = newFilter; } else { tailFilter.setNext(newFilter); tailFilter = newFilter; } }
/** The root logger names itself as "root". However, the root logger cannot be retrieved by name. */ public RootLogger(Level level) { super("root"); setLevel(level); }
/** * {@inheritDoc} */ public Enumeration getCurrentCategories() { return getCurrentLoggers(); }
/** {@inheritDoc} */ public Priority getChainedPriority() { return getEffectiveLevel(); }
/** Return this event's throwable's string[] representaion. */ public String[] getThrowableStrRep() { if(throwableInfo == null) return null; else return throwableInfo.getThrowableStrRep(); }
/** * {@inheritDoc} */ public Logger getLogger(final String name, final LoggerFactory factory) { return new NOPLogger(this, name); }
final public void setPriority(Level level) { setLevel(level); }
/** * {@inheritDoc} */ public Logger getRootLogger() { return new NOPLogger(this, "root"); }