You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When config.log is defined, this file is opened in append mode.
The log file will grow endlessly if not manually cleared/deleted.
It would be great if you can add a config variable to open the file in write mode.
It should wipe the content of the log file each time the game starts
I'm thinking of something like that:
in config.rpy
# A logfile that logging messages are sent to.
log = None
# Clear config.log at startup
clear_log = False
and in export.py
if not logfile:
import os
if renpy.config.clear_log:
file_mode = "w"
else:
file_mode = "a"
logfile = open(os.path.join(renpy.config.basedir, renpy.config.log), file_mode)
So we can change the filemode through options.rpy with something like this:
When
config.log
is defined, this file is opened in append mode.The log file will grow endlessly if not manually cleared/deleted.
It would be great if you can add a config variable to open the file in write mode.
It should wipe the content of the log file each time the game starts
I'm thinking of something like that:
in
config.rpy
and in
export.py
So we can change the filemode through
options.rpy
with something like this:If that's not relevant, I'll continue to manually delete the log file.
Thanks
The text was updated successfully, but these errors were encountered: