public String convert(PaxLoggingEvent event) { PaxLocationInfo 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(PaxLoggingEvent event) { PaxLocationInfo 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(PaxLoggingEvent event) { if(!event.locationInformationExists()){ return "?"; } PaxLocationInfo 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; } } }
if (locationInformation != null) { answer.setClassName(locationInformation.getClassName()); answer.setFileName(locationInformation.getFileName()); answer.setMethodName(locationInformation.getMethodName()); answer.setLineNumber(locationInformation.getLineNumber());
if (locationInformation != null) { answer.setClassName(locationInformation.getClassName()); answer.setFileName(locationInformation.getFileName()); answer.setMethodName(locationInformation.getMethodName()); answer.setLineNumber(locationInformation.getLineNumber());
if (locationInformation != null) { answer.setClassName(locationInformation.getClassName()); answer.setFileName(locationInformation.getFileName()); answer.setMethodName(locationInformation.getMethodName()); answer.setLineNumber(locationInformation.getLineNumber());