Skip to content

Commit

Permalink
[SystemLog] : fix arm
Browse files Browse the repository at this point in the history
  • Loading branch information
L1MeN9Yu committed Nov 3, 2021
1 parent 9b6faba commit 8925f27
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Sources/Sinks/SystemLogSink.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,17 @@ import Glibc

struct SystemLogSink: SinkCapable {
func process(_ formattedLog: String, _ level: Logger.Level) {
#if arch(arm) || arch(arm64)
formattedLog.withCString {
vsyslog(priority(level), $0, nil)
}
#elseif arch(i386) || arch(x86_64)
withVaList([]) { args in
formattedLog.withCString {
vsyslog(priority(level), $0, args)
}
}
#endif
}
}

Expand Down

0 comments on commit 8925f27

Please sign in to comment.