Question: Logging renderer to file and devTools - but not to terminal
See original GitHub issueI am using electron log in my electron application. First of all, thanks for this project.
My application supports a commandline-parameter (--verbose
) for optional enabling verbose mode.
The idea is:
- If the application is started with
--verbose
from a terminal - the terminal AND the devtools should both show all the logging output from my renderer process. - If the application is started without
--verbose
it should just write the renderer logging to the DevTools but NOT to the terminal
Right now i tried reaching this using log.transports.console.level
.
If my app is started using --verbose
i set log.transports.console.level = true
, otherwise to log.transports.console.level = false
.
But this effects both:
- logging to terminal
- logging to devtools
Is there an option to control devtools vs terminal output?
Best regards
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Using console.log() in Electron app - Stack Overflow
When you call the console. log() from main process of electron app, it will output to the terminal window from where you just...
Read more >How to log errors in main and render process to a file? #731
All I want is to generate a log file, which should have output of not just Console.error() but also Console.log() , Console.info() ....
Read more >How to enable logging - The Chromium Projects
To enable logging, launch Chrome with these command line flags: ... If you are debugging renderer startup on Windows, we recommend you enable...
Read more >Troubleshooting | Cypress Documentation
Open Cypress via cypress open · Go to Developer Tools -> View App Data · This will take you to the directory in...
Read more >Log messages in the Console - Chrome Developers
Focus the demo and then press Control + Shift + J or Command + Option + J (Mac) to open DevTools. By default...
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
In this case, you can disable console transport only in main process.
that part wasn’t obvious for me.