Remove traces of StackTraceElement class
This commit is contained in:
parent
2b8cf723f6
commit
c540060bcd
4 changed files with 20 additions and 10 deletions
|
@ -114,7 +114,14 @@ class Logger {
|
|||
}
|
||||
|
||||
// Create 'Call' instance
|
||||
var call: Call = Call(origin, level, message, channel)
|
||||
var call: Call = Call(
|
||||
origin.className,
|
||||
origin.methodName,
|
||||
origin.lineNumber,
|
||||
level,
|
||||
message,
|
||||
channel
|
||||
)
|
||||
|
||||
// Run processing
|
||||
if (level == Level.CRASH)
|
||||
|
|
|
@ -146,12 +146,12 @@ class SOSLSv2FormatBuilder(call: Call) : FormatBuilder(call) {
|
|||
// TODO sanitization (<init>, <clinit>)?
|
||||
format
|
||||
.append("#")
|
||||
.append(call.origin.methodName)
|
||||
.append(call.methodName)
|
||||
|
||||
if (enabledFeatures.contains(Feature.LINE_NUMBER) && call.origin.lineNumber >= 0)
|
||||
if (enabledFeatures.contains(Feature.LINE_NUMBER) && call.lineNumber >= 0)
|
||||
format
|
||||
.append("~L")
|
||||
.append(call.origin.lineNumber)
|
||||
.append(call.lineNumber)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -62,10 +62,9 @@ class InfoCrashCategory private constructor() : CrashCategory {
|
|||
): LinkedHashMap<String, Any> {
|
||||
return linkedMapOf(
|
||||
Pair("Origin", linkedMapOf<String, Any>(
|
||||
Pair("Class", call.origin.className),
|
||||
Pair("Method", call.origin.methodName),
|
||||
Pair("Line", call.origin.lineNumber),
|
||||
Pair("Native", if (call.origin.isNativeMethod) "yes" else "false")
|
||||
Pair("Class", call.origin),
|
||||
Pair("Method", call.methodName),
|
||||
Pair("Line", call.lineNumber),
|
||||
)),
|
||||
Pair("Channel", call.channel),
|
||||
Pair("Fatal", if (fatal) "yes" else "no"),
|
||||
|
|
|
@ -23,14 +23,18 @@ package de.staropensource.engine.logging.type
|
|||
/**
|
||||
* Holds information about log calls.
|
||||
*
|
||||
* @param origin origin
|
||||
* @param origin package + class name that made the call
|
||||
* @param methodName name of the method that made the call
|
||||
* @param lineNumber line number where the call was made
|
||||
* @param level level
|
||||
* @param message message
|
||||
* @param channel channel
|
||||
* @since v1-alpha10
|
||||
*/
|
||||
data class Call(
|
||||
val origin: StackTraceElement,
|
||||
val origin: String,
|
||||
val methodName: String,
|
||||
val lineNumber: Int,
|
||||
val level: Level,
|
||||
var message: String,
|
||||
val channel: String = "default",
|
||||
|
|
Loading…
Reference in a new issue