mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-08-29 14:47:21 +02:00
iOS fix onLog listener event for realtime logs
This commit is contained in:
@@ -54,7 +54,14 @@ public class AbsLogger: CAPPlugin, CAPBridgedPlugin {
|
||||
entry.level = "\(level)"
|
||||
entry.timestamp = Int(Date().timeIntervalSince1970 * 1000)
|
||||
try Database.shared.saveLog(entry)
|
||||
self.notifyListeners("onLog", data: ["value": entry])
|
||||
|
||||
self.notifyListeners("onLog", data: [
|
||||
"id": entry.id,
|
||||
"tag": entry.tag,
|
||||
"message": entry.message,
|
||||
"level": entry.level,
|
||||
"timestamp": entry.timestamp
|
||||
])
|
||||
}
|
||||
|
||||
public func info(tag: String = "\(#file)", message: String) throws {
|
||||
|
||||
Reference in New Issue
Block a user