update logger api (#54)

This commit is contained in:
Lynn
2017-04-07 13:13:10 -07:00
committed by GitHub
parent bcd2f8e645
commit 1e6dfec68c
2 changed files with 4 additions and 7 deletions

View File

@@ -12,8 +12,8 @@ let logWindow;
function send(level, details) {
if (logWindow && level && details) {
logWindow.send('log', {
logLevel: level,
logDetails: details
level: level,
details: details
});
}
}

View File

@@ -92,11 +92,8 @@ Object.freeze(window.SYM_API);
// listen for log message from main process
local.ipcRenderer.on('log', (event, arg) => {
if (local.logger && arg && arg.level && arg.msg) {
local.logger({
logLevel: arg.level,
logDetails: arg.msg
});
if (local.logger && arg && arg.level && arg.details) {
local.logger(arg.level, arg.details);
}
});