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

Unable to restrict the log file permissions #430

Closed benji closed 2 months ago

benji commented 2 months ago

Hello!

I am trying to change the file permissions from: -rw-r--r-- to -rw-r-----, so I'm using writeOptions like so:

log.transports.file.writeOptions = { flag: "a", mode: 0o640 };

However the file permissions remain unchanged. I am suspecting that I'm not initializing the logger or transport properly.

I've created a Electron Fiddle Gist here: https://gist.github.com/benji/c8d74654cef2876a33414ba467651d01.

Versions:

Thanks for the help!

megahertz commented 2 months ago

Thanks for the report and the gist