mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-23 02:00:20 +07:00
21 lines
685 B
Swift
21 lines
685 B
Swift
|
|
import Foundation
|
||
|
|
import os.log
|
||
|
|
|
||
|
|
public func wg_log(_ type: OSLogType, staticMessage: StaticString) {
|
||
|
|
guard Log.isLoggingEnabled else { return }
|
||
|
|
|
||
|
|
Log.Record(date: Date(), level: Log.Record.Level(from: type), message: "\(staticMessage)").save(at: Log.neLogURL)
|
||
|
|
}
|
||
|
|
|
||
|
|
public func wg_log(_ type: OSLogType, message: String) {
|
||
|
|
guard Log.isLoggingEnabled else { return }
|
||
|
|
|
||
|
|
Log.Record(date: Date(), level: Log.Record.Level(from: type), message: message).save(at: Log.neLogURL)
|
||
|
|
}
|
||
|
|
|
||
|
|
public func log(_ type: OSLogType, message: String) {
|
||
|
|
guard Log.isLoggingEnabled else { return }
|
||
|
|
|
||
|
|
Log.Record(date: Date(), level: Log.Record.Level(from: type), message: message).save(at: Log.neLogURL)
|
||
|
|
}
|