Skip to content

Commit

Permalink
Update Log.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
omrd authored Feb 5, 2021
1 parent 6eeeaed commit f7d58f0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Sources/PerfectLib/Log.swift
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ public struct SysLogger: Logger {
public init(){}

func syslog(priority: Int32, _ args: CVarArg...) {
// #if os(Linux) || os(macOS)
// withVaList(args) {
// vsyslog(priority, "%s", $0)
// }
// #else
#if os(Linux)// || os(macOS)
withVaList(args) {
vsyslog(priority, "%s", $0)
}
#else
// nerdo: Using unified logging (https://developer.apple.com/documentation/os/logging)
// os_log isn't very well documented... but this seems like a step in the right direction.
let osLogType: OSLogType
Expand All @@ -89,7 +89,7 @@ public struct SysLogger: Logger {
osLogType = .default
}
os_log("%s", log: .default, type: osLogType, args)
// #endif
#endif
}

public func debug(message: String, _ even: Bool) {
Expand Down

0 comments on commit f7d58f0

Please sign in to comment.