Just provide the classname and method when providing log message context.
Tidied up some other bits. git-svn-id: https://samskivert.googlecode.com/svn/trunk@2106 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -72,14 +72,12 @@ public class OneLineLogFormatter extends Formatter
|
|||||||
if (_showWhere) {
|
if (_showWhere) {
|
||||||
// append the log method call context
|
// append the log method call context
|
||||||
String where = record.getSourceClassName();
|
String where = record.getSourceClassName();
|
||||||
boolean legacy = (where.indexOf("LoggingLogProvider") != -1);
|
if (where != null) {
|
||||||
if (where != null && !legacy) {
|
// strip the package name from the logging class
|
||||||
String logger = record.getLoggerName();
|
where = where.substring(where.lastIndexOf(".")+1);
|
||||||
if (logger != null && where.startsWith(logger) &&
|
}
|
||||||
where.length() > logger.length()) {
|
boolean legacy = where.equals("Log") || where.equals("LoggingLogProvider");
|
||||||
where = where.substring(logger.length()+1);
|
if (legacy) {
|
||||||
}
|
|
||||||
} else {
|
|
||||||
where = record.getLoggerName();
|
where = record.getLoggerName();
|
||||||
}
|
}
|
||||||
buf.append(where);
|
buf.append(where);
|
||||||
|
|||||||
Reference in New Issue
Block a user