Skip to content

Commit

Permalink
fix(event): console-message should pass only error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
megahertz committed Aug 22, 2023
1 parent 4bd68a1 commit 32e5ff8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "electron-log",
"version": "5.0.0-beta.27",
"version": "5.0.0-beta.28",
"description": "Just a simple logging module for your Electron application",
"main": "src/index.js",
"browser": "src/renderer/index.js",
Expand Down
3 changes: 2 additions & 1 deletion src/main/EventLogger.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ class EventLogger {

webContents: {
'console-message': ({ args: [level, message, line, sourceId] }) => {
if (level > 2) {
// 0: debug, 1: info, 2: warning, 3: error
if (level < 3) {
return undefined;
}

Expand Down

0 comments on commit 32e5ff8

Please sign in to comment.