Log file not generated on macOS in packaged app
See original GitHub issueAs soon as I run my packaged app, the directory ~/Library/Logs/myapp/
is created, but no log file is ever created. However, the log file gets created when I run from source. My app is code signed (not that I think that that matters, though).
I’m running the following code from my entry file (package.json.main
):
const log = require("electron-log");
log.transports.file.level = "silly";
// I've tried it with and without this line:
log.transports.file.file = "~/Library/Logs/my app/log3.log";
// I see plenty of logs when I run the app from source (not the packaged, distributed form)
log.transports.console.level = "silly";
// I also don't see logs in the chrome dev tools console when I open them in my packaged app
log.transports.rendererConsole.level = "silly";
log.info("can you see me?")
Any ideas? I’ve looked through every Github issue in this project that seems even remotely related, so I’m out of ideas.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Locate a log file using Console on Mac
In the Console app on your Mac, select Log Reports in the sidebar. If the Log Reports category isn't visible, click the Sidebar...
Read more >Log not saved in Mac OS X · Issue #82
I was expecting to find a folder called my-app and a file called log.log inside, as you wrote in the docs... can you...
Read more >(No title)
log file (to see what went wrong while running my app) on my MacBook Air, but when I navigate to /Users/keith-mac/ , I...
Read more >How to Read Log Files on Windows, Mac, and Linux
Most log files on Linux can be found in the /var/log directory, but some desktop applications have their logs stored in a different...
Read more >Log files
Unity produces log files for the Editor, package manager, licensing, development players, and Hub. You can use these log files to understand where...
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
Sorry, I have no idea why it doesn’t work. It seems that your packaged application contains some old code without your latest changes, but I’m not sure.
@sibljon I mean
App.app/Contents/MacOS/App