]> git.proxmox.com Git - mirror_novnc.git/blobdiff - core/util/logging.js
Use fat arrow functions `const foo = () => { ... };` for callbacks
[mirror_novnc.git] / core / util / logging.js
index 5669ad2db219d0962dba047086af2182bb633a25..1f6a71e0b7ac89cc452bbcf09f01b1f79d47a907 100644 (file)
 
 let _log_level = 'warn';
 
-let Debug = function (msg) {};
-let Info = function (msg) {};
-let Warn = function (msg) {};
-let Error = function (msg) {};
+let Debug = () => {};
+let Info = () => {};
+let Warn = () => {};
+let Error = () => {};
 
 export function init_logging (level) {
     if (typeof level === 'undefined') {
@@ -24,7 +24,7 @@ export function init_logging (level) {
         _log_level = level;
     }
 
-    Debug = Info = Warn = Error = function (msg) {};
+    Debug = Info = Warn = Error = () => {};
 
     if (typeof window.console !== "undefined") {
         /* eslint-disable no-console, no-fallthrough */