Remove traces of StackTraceElement class
All checks were successful
PRs & Pushes / build (push) Successful in 2m8s
PRs & Pushes / build-apidoc (push) Successful in 2m34s

This commit is contained in:
JeremyStar™ 2024-12-15 19:20:24 +01:00
parent 2b8cf723f6
commit c540060bcd
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D
4 changed files with 20 additions and 10 deletions

View file

@ -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)

View file

@ -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)
}
}
}

View file

@ -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"),

View file

@ -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",