Nothing Happening
See original GitHub issueElectron: 1.7.9 Nodejs: 9.2.0 OS: Windows 10
I have installed electron-log
npm install --save electron-log
I have included the module
var log = require('electron-log');
Yet upon attempting to log something
log.info('Hello, log - info');
log.warn('Hello, log - warning');
Absolutely nothing is happening. No errors are occuring, no log messages in console, and no file is being created where the documentation suggests it should be created:
%USERPROFILE%\AppData\Roaming\<app name>\log.log
Are you able to confirm this is working in node 9.2.0?
Issue Analytics
- State:
- Created 6 years ago
- Comments:20 (8 by maintainers)
Top Results From Across the Web
Nothing Happening: Lennon, Lisa - Amazon.com
Finally, the book that many have been waiting for, is here. Whether you're feeling stuck, tired of seeking or just in love with...
Read more >Nothing Happens - Album by Wallows - Spotify
Nothing Happens. Wallows. 201911 songs, 38 min 51 sec. 1. Only FriendWallows. 2. Treacherous DoctorWallows. 3. SidelinesWallows. 4. Are You Bored Yet?
Read more >Nothing Happening - Beavis and Butt-Head Wiki - Fandom
Nothing Happening is the 15th episode in Season 7 of Beavis and Butt-head. It is the overall 177th episode. It first aired on...
Read more >Nothing Happens (album) - Wikipedia
Nothing Happens is the debut studio album by American band Wallows. It was released on March 22, 2019 through Atlantic Records.
Read more >Nothing-happening GIFs - Get the best GIF on GIPHY
Explore and share the best Nothing-happening GIFs and most popular animated GIFs here on GIPHY. Find Funny GIFs, Cute GIFs, Reaction GIFs and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Okay so through some testing I’ve discovered few things – I will admit your documentation is a little misleading – but maybe thats just my interpretation of it. Posting the default behavior in the event this helps anyone else:
To use this in main.js, you must include as:
var log = require('electron-log');
Outside of main.js, include as such:
var log = require('electron-log/renderer');
By default, only
.error
and.warn
will result in output to the local file.To help showcase where each log level gets written by default, I used the following test block:
If used within the main process:
main console:
error, warn, info, verbose, debug, silly
render console:-none-
local file:error, warn
If used outside the main process:
main console:
error, warn, info, verbose, debug, silly
render console:error, warn, info, verbose
local file:error, warn
You can disable logging to console, from the main process, as such:
log.transports.console.level = false;
However, if you attempt to disable console level logging within a render process, it breaks. If you wish to disable console level logging in a render process, you will need to include electron-log like this instead:
Personally, I find it odd that logs within the render process, are also logged to the main process console. I also feel like your documentation could use some clarification.
Nothing Happening +1