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
|
// 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
|
// Run processing
|
||||||
if (level == Level.CRASH)
|
if (level == Level.CRASH)
|
||||||
|
|
|
@ -146,12 +146,12 @@ class SOSLSv2FormatBuilder(call: Call) : FormatBuilder(call) {
|
||||||
// TODO sanitization (<init>, <clinit>)?
|
// TODO sanitization (<init>, <clinit>)?
|
||||||
format
|
format
|
||||||
.append("#")
|
.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
|
format
|
||||||
.append("~L")
|
.append("~L")
|
||||||
.append(call.origin.lineNumber)
|
.append(call.lineNumber)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,10 +62,9 @@ class InfoCrashCategory private constructor() : CrashCategory {
|
||||||
): LinkedHashMap<String, Any> {
|
): LinkedHashMap<String, Any> {
|
||||||
return linkedMapOf(
|
return linkedMapOf(
|
||||||
Pair("Origin", linkedMapOf<String, Any>(
|
Pair("Origin", linkedMapOf<String, Any>(
|
||||||
Pair("Class", call.origin.className),
|
Pair("Class", call.origin),
|
||||||
Pair("Method", call.origin.methodName),
|
Pair("Method", call.methodName),
|
||||||
Pair("Line", call.origin.lineNumber),
|
Pair("Line", call.lineNumber),
|
||||||
Pair("Native", if (call.origin.isNativeMethod) "yes" else "false")
|
|
||||||
)),
|
)),
|
||||||
Pair("Channel", call.channel),
|
Pair("Channel", call.channel),
|
||||||
Pair("Fatal", if (fatal) "yes" else "no"),
|
Pair("Fatal", if (fatal) "yes" else "no"),
|
||||||
|
|
|
@ -23,14 +23,18 @@ package de.staropensource.engine.logging.type
|
||||||
/**
|
/**
|
||||||
* Holds information about log calls.
|
* 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 level level
|
||||||
* @param message message
|
* @param message message
|
||||||
* @param channel channel
|
* @param channel channel
|
||||||
* @since v1-alpha10
|
* @since v1-alpha10
|
||||||
*/
|
*/
|
||||||
data class Call(
|
data class Call(
|
||||||
val origin: StackTraceElement,
|
val origin: String,
|
||||||
|
val methodName: String,
|
||||||
|
val lineNumber: Int,
|
||||||
val level: Level,
|
val level: Level,
|
||||||
var message: String,
|
var message: String,
|
||||||
val channel: String = "default",
|
val channel: String = "default",
|
||||||
|
|
Loading…
Reference in a new issue