amnezia-client/client/platforms/ios/NELogController.swift
isamnezia f3a168fd43
Codacy compatibility (#575)
Refactor and split iostunnel with cmake changes, code cleanup
2024-02-10 22:55:54 +00:00

18 lines
564 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) {
log(type, message: message)
}
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)
}