2024-02-10 19:44:55 +03:00
|
|
|
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) {
|
2024-02-11 01:55:54 +03:00
|
|
|
log(type, message: message)
|
2024-02-10 19:44:55 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
}
|