The sink argument I'm using for my file handler is currently this logs_dir / '{time:YYYY-MM-DD_HH-mm-ss}.log', which formats the log file based on the time it was created. I couldn't find this in the documentation so I figured I'd ask here, would there be any way specific to loguru that I can say have the current log file (as in the one that is being written to at present for the course of the script) be named something like latest.log, and then either on exit or at next startup it gets renamed to the time format? If not I can always do this manually, but I wasn't sure if loguru had anything built in for that.
The
sinkargument I'm using for my file handler is currently thislogs_dir / '{time:YYYY-MM-DD_HH-mm-ss}.log', which formats the log file based on the time it was created. I couldn't find this in the documentation so I figured I'd ask here, would there be any way specific to loguru that I can say have the current log file (as in the one that is being written to at present for the course of the script) be named something likelatest.log, and then either on exit or at next startup it gets renamed to the time format? If not I can always do this manually, but I wasn't sure if loguru had anything built in for that.