-
Notifications
You must be signed in to change notification settings - Fork 132
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
Is there a way to prevent the creation of default main.log file #230
Comments
Are you sure a new path is configured right after electron-log is requires for the first time? If so, could you provide code which can reproducing the issue? |
Hi this is the part in main.js where i am setting up the logger function setupLogger() { |
First of all, try to call setupLogger() on entry point. app ready event may be fired too late. |
Tried calling setupLogger() after requires in main.js but still seeing the issue. |
If main.log is not empty, it does mean that logging is called before initialization. There are many ways how to find what happens. In such a situation, I usually prefer to patch a library for debugging (in node_modules). For example, you can patch |
I was able to find the entry point where the first log was being written using your suggested method and moved my function accordingly. Now it is working fine. Thanks a lot for your time. |
I have configured to write the log files in my custom app path which works fine. But i still see the initial log file created in ~/Library/Logs/ + appName + / + main.log on macOS. Is there a way i can prevent this or at least change the appName in the default path without affecting my custom path ?
The text was updated successfully, but these errors were encountered: