fix SDLLogger

This commit is contained in:
anlicheng 2026-05-26 20:10:32 +08:00
parent 2ef2633d5b
commit 958f9009bc

View File

@ -23,13 +23,12 @@ public class SDLLogger: @unchecked Sendable {
private let log: Logger
private init(subsystem: Subsystem) {
let env = ProcessInfo.processInfo.environment["RUNTIME_ENV"] ?? "prod"
var label: String
switch subsystem {
case .debug:
label = "com.jihe.punchnet-\(env).debug"
label = "com.jihe.punchnet.debug"
case .trace:
label = "com.jihe.punchnet-\(env).trace"
label = "com.jihe.punchnet.trace"
}
self.log = Logger(subsystem: label, category: "punchnet")
}