Page 1 of 1

Reset log file while running

PostPosted: Wed Apr 28, 2021 12:56 pm
by sjames1958
Is it possible to reset the cef log file while running?
we want to capture the existing log file at a certain point in the app and start a new one with a new filename.
Is this possible?
Does CEF support log rolling? Opening a new log file after a certain size has been reached?

Re: Reset log file while running

PostPosted: Wed Apr 28, 2021 1:26 pm
by magreenblatt
CEF does not support this internally, but you can use a third-party tool.

Re: Reset log file while running

PostPosted: Thu Apr 29, 2021 12:23 pm
by HarmlessDave
It might be easiest to copy the console.log, debug.log to other named files like console-2021-04-29.log then truncate the main console and debug files back to empty. That can be done with a function inside your application and avoids any problems with file locking.