iOS fix onLog listener event for realtime logs

This commit is contained in:
advplyr
2025-11-18 17:24:49 -06:00
parent b773ec7690
commit 399a01a937
2 changed files with 21 additions and 14 deletions
+8 -1
View File
@@ -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 {