mirror of
https://github.com/corda/corda.git
synced 2025-01-29 15:43:55 +00:00
Logging: don't include inner class names in log output (i.e. trim anything after the $ sign in the class name)
This commit is contained in:
parent
fbd4b60834
commit
606926a692
@ -34,8 +34,8 @@ class BriefLogFormatter : Formatter() {
|
||||
val arguments = arrayOfNulls<Any>(6)
|
||||
arguments[0] = logRecord.threadID
|
||||
val fullClassName = logRecord.sourceClassName
|
||||
val lastDot = fullClassName.lastIndexOf('.')
|
||||
val className = fullClassName.substring(lastDot + 1)
|
||||
val dollarIndex = fullClassName.indexOf('$')
|
||||
val className = fullClassName.substring(fullClassName.lastIndexOf('.') + 1, if (dollarIndex == -1) fullClassName.length else dollarIndex)
|
||||
arguments[1] = className
|
||||
arguments[2] = logRecord.sourceMethodName
|
||||
arguments[3] = Date(logRecord.millis)
|
||||
|
Loading…
x
Reference in New Issue
Block a user