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 files not getting created in a regular interval of time. #340

Closed monica-muthukumaran closed 1 year ago

monica-muthukumaran commented 1 year ago

I was trying to create logfiles with UTC_Timestamps as their file name. Expectation: A new log file has to be created in regular interval of time.

Tried out : image

Log files are not getting generated

megahertz commented 1 year ago

Which electron-log version do you use?

monica-muthukumaran commented 1 year ago

v4.4.8 @megahertz

megahertz commented 1 year ago

Try v5 beta

monica-muthukumaran commented 1 year ago

It didn't work: image image And the LOG Folder: image @megahertz , "check-on-interval" is getting consoled.

megahertz commented 1 year ago

Will check later. Currently, you can try to make a log path using path.join instead of direct concatenating, maybe that's the reason

monica-muthukumaran commented 1 year ago

Path.join() gives me a log file only once. image

image

monica-muthukumaran commented 1 year ago

Got it working!.

agnel-inveox commented 7 months ago

I was working on something similar. What I'm thinking is archiving current log file when the day changes and use a new log file.

Any suggestions @monica-muthukumaran and @megahertz ?

megahertz commented 7 months ago

@agnel-inveox resolvePathFn from the last monica-muthukumaran's example should work

agnel-inveox commented 7 months ago

@agnel-inveox resolvePathFn from the last monica-muthukumaran's example should work

@megahertz ok. let me give it a try.