Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow logging to a file on Windows #15979

Closed
nornagon opened this issue Dec 8, 2018 · 4 comments
Closed

Allow logging to a file on Windows #15979

nornagon opened this issue Dec 8, 2018 · 4 comments

Comments

@nornagon
Copy link
Member

nornagon commented Dec 8, 2018

With Chrome, --enable-logging --log-file=log.txt on Windows results in logs being written to log.txt. Electron, however, ignores the --log-file and always writes to the system debug log with OutputDebugString: https://github.com/electron/electron/blob/master/atom/app/atom_main_delegate.cc#L139

It's useful for telemetry to be able to redirect logs to a file, and there's presently no reliable way to do that on Windows.

@mrobrian
Copy link

Until there is better built-in support, I recommend electron-log. We created a Windows app and use that package, and it has some nice features.

@nornagon
Copy link
Member Author

It doesn't log Chromium's logs to that file though, which is important :)

@robatwilliams
Copy link

This would be very useful, especially given that piping electron output to a file does not work. When I try to do that, a new console window is opened for every process, and nothing ends up in the file.

@miniak
Copy link
Contributor

miniak commented Sep 10, 2021

Addressed by #25089

@miniak miniak closed this as completed Sep 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants