megahertz / electron-log

Simple logging module Electron/Node.js/NW.js application. No dependencies. No complicated configuration.
MIT License
1.3k stars 127 forks source link

log permission #328

Closed alicera closed 1 year ago

alicera commented 1 year ago

user 'a' generate the log/main.log user 'b' want to write the log/main.log

I meet the permission. How can I fix it on the code not the command chmod on terminal. I want the user 'b' can directly use the log/main.log without dothing.

https://github.com/megahertz/electron-log#options-1

megahertz commented 1 year ago

Normally, each user has its own log directory. When your app writes the same file for different users you should control file permissions by yourself. The easiest way it to set log file permissions to 0x666 on app start.