cordova-plugin-unvired-logger 0.0.17 → 0.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cordova-plugin-unvired-logger",
3
- "version": "0.0.17",
3
+ "version": "0.0.18",
4
4
  "description": "A logger plugin for Electron, Android, Browser, and iOS that appends logs to log.txt files organized by user ID.",
5
5
  "cordova": {
6
6
  "id": "cordova-plugin-unvired-logger",
package/plugin.xml CHANGED
@@ -1,5 +1,5 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <plugin id="cordova-plugin-unvired-logger" version="0.0.17"
2
+ <plugin id="cordova-plugin-unvired-logger" version="0.0.18"
3
3
  xmlns="http://apache.org/cordova/ns/plugins/1.0"
4
4
  xmlns:android="http://schemas.android.com/apk/res/android">
5
5
 
@@ -132,6 +132,10 @@ public class Logger extends CordovaPlugin {
132
132
  checkAndRotateLogFile(logFile, userId);
133
133
 
134
134
  String logEntry = formatLogEntry(level, sourceClass, sourceMethod, message);
135
+
136
+ // Print to console before writing to file
137
+ System.out.println(logEntry.trim());
138
+
135
139
  appendToFile(logFile, logEntry);
136
140
 
137
141
  callbackContext.success("Logged to " + logFile.getAbsolutePath());
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cordova-plugin-unvired-logger",
3
- "version": "0.0.17",
3
+ "version": "0.0.18",
4
4
  "description": "Electron platform package for cordova-plugin-unvired-logger",
5
5
  "main": "Logger.js",
6
6
  "scripts": {
@@ -62,6 +62,9 @@ import UIKit
62
62
 
63
63
  let logEntry = self.formatLogEntry(level: level, sourceClass: sourceClass, sourceMethod: sourceMethod, message: message)
64
64
 
65
+ // Print to console before writing to file
66
+ print(logEntry.trimmingCharacters(in: .whitespacesAndNewlines))
67
+
65
68
  // Perform file write in background
66
69
  self.appendToFile(file: logFile, data: logEntry) { error in
67
70
  if let error = error {