parent
f2d13148a3
commit
158c11a0ec
12 changed files with 252 additions and 93 deletions
20
client/platforms/ios/NELogController.swift
Normal file
20
client/platforms/ios/NELogController.swift
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
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)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue