Skip to content

Commit 66f0466

Browse files
authored
Restore log formatting (#33)
1 parent 3d63054 commit 66f0466

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

Source/Logs.swift

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,16 @@ class Logs {
2020
#if !os(Linux)
2121
private let logger: OSLog = OSLog(subsystem: "com.launchdarkly.swift-eventsource", category: "LDEventSource")
2222

23-
func log(_ level: Level, _ staticMsg: StaticString, _ args: CVarArg...) {
24-
os_log(staticMsg, log: logger, type: level.osLogType, args)
23+
func log(_ level: Level, _ staticMsg: StaticString) {
24+
os_log(staticMsg, log: logger, type: level.osLogType)
25+
}
26+
27+
func log(_ level: Level, _ staticMsg: StaticString, _ arg: CVarArg) {
28+
os_log(staticMsg, log: logger, type: level.osLogType, arg)
29+
}
30+
31+
func log(_ level: Level, _ staticMsg: StaticString, _ arg1: CVarArg, _ arg2: CVarArg) {
32+
os_log(staticMsg, log: logger, type: level.osLogType, arg1, arg2)
2533
}
2634
#else
2735
// We use Any over CVarArg here, because on Linux prior to Swift 5.4 String does not conform to CVarArg

0 commit comments

Comments
 (0)