/** * {@inheritDoc} */ public void format(final LoggingEvent event, final StringBuffer output) { LocationInfo locationInfo = event.getLocationInformation(); if (locationInfo != null) { output.append(locationInfo.getFileName()); } } }
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; } } }
LocationInfo locInfo = event.getLocationInformation(); sbuf.append("<td>"); sbuf.append(Transform.escapeTags(locInfo.getFileName())); sbuf.append(':'); sbuf.append(locInfo.getLineNumber());
buf.append(Transform.escapeTags(locationInfo.getMethodName())); buf.append("\" file=\""); buf.append(Transform.escapeTags(locationInfo.getFileName())); buf.append("\" line=\""); buf.append(locationInfo.getLineNumber());
/** * {@inheritDoc} */ public void format(final LoggingEvent event, final StringBuffer output) { LocationInfo locationInfo = event.getLocationInformation(); if (locationInfo != null) { output.append(locationInfo.getFileName()); } } }
answer.setFileName(locationInformation.getFileName()); answer.setClassName(locationInformation.getClassName()); answer.setMethodName(locationInformation.getMethodName());
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; } } }
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; } } }
LocationInfo locInfo = event.getLocationInformation(); sbuf.append("<td>"); sbuf.append(Transform.escapeTags(locInfo.getFileName())); sbuf.append(':'); sbuf.append(locInfo.getLineNumber());
LocationInfo locInfo = event.getLocationInformation(); sbuf.append("<td>"); sbuf.append(Transform.escapeTags(locInfo.getFileName())); sbuf.append(':'); sbuf.append(locInfo.getLineNumber());
buf.append(Transform.escapeTags(locationInfo.getMethodName())); buf.append("\" file=\""); buf.append(Transform.escapeTags(locationInfo.getFileName())); buf.append("\" line=\""); buf.append(locationInfo.getLineNumber());
public String getFileName() { return m_delegate.getFileName(); }
public String getFileName() { return m_delegate.getFileName(); }
/** * {@inheritDoc} */ public void format(final LoggingEvent event, final StringBuffer output) { LocationInfo locationInfo = event.getLocationInformation(); if (locationInfo != null) { output.append(locationInfo.getFileName()); } } }
/** * {@inheritDoc} */ public void format(final LoggingEvent event, final StringBuffer output) { LocationInfo locationInfo = event.getLocationInformation(); if (locationInfo != null) { output.append(locationInfo.getFileName()); } } }
/** * {@inheritDoc} */ public void format(final LoggingEvent event, final StringBuffer output) { LocationInfo locationInfo = event.getLocationInformation(); if (locationInfo != null) { output.append(locationInfo.getFileName()); } } }
/** * {@inheritDoc} */ public void format(final LoggingEvent event, final StringBuffer output) { LocationInfo locationInfo = event.getLocationInformation(); if (locationInfo != null) { output.append(locationInfo.getFileName()); } } }
public void log(Level level, String message) { LocationInfo locationInfo = new LocationInfo(new Throwable(), loggerName); MDC.put(LINE_NUMBER, locationInfo.getLineNumber()); MDC.put(FILE_NAME, locationInfo.getFileName()); MDC.put(CLASS_NAME, locationInfo.getClassName()); MDC.put(METHOD_NAME, locationInfo.getMethodName()); MDC.put(FQMETHOD_NAME, locationInfo.getClassName() + "." + locationInfo.getMethodName()); logger.log(level, message); MDC.remove(LINE_NUMBER); MDC.remove(FILE_NAME); MDC.remove(CLASS_NAME); MDC.remove(METHOD_NAME); MDC.remove(FQMETHOD_NAME); }
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; } } }
@Override protected void append(LoggingEvent event) { final LevelTag level = LevelTag.get(event.getLevel()); registry.counter(numMessages[level.ordinal()]).increment(); ThrowableInformation info = event.getThrowableInformation(); if (info != null) { LocationInfo loc = event.getLocationInformation(); final String file = (loc == null) ? "unknown" : loc.getFileName(); Id stackTraceId = numStackTraces[level.ordinal()] .withTag("exception", info.getThrowable().getClass().getSimpleName()) .withTag("file", file); registry.counter(stackTraceId).increment(); } }