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
Hello! Firstly, thank you guys for the great project. I've been using it in my production environment and it's very convenient.
But it is not that smooth while using the rotation, which creates massive log files and it's a bit cumbersome for me to access the newest one every time I search for an entry. More specifically, I have to find the one with the smallest mtime (yes, it could be done with the help of ls options) first, then enter the suffix of the target file since they all share the same prefix so that autocomplete won't work perfectly.
So I wonder whether there is any way to create a symbolic link that always points to the latest log file, just as what glog's SetLogSymlink does, to facilitate my search process. I've searched for the keyword symbolic link in the document but found nothing, so I come here for advice.
The text was updated successfully, but these errors were encountered:
Interesting feature. As of today, it's not easily achievable.
What about using logger.add("filename.log", rotation="2 days")? This would ensure that the latest log is always accessible through "filename.log", while older ones will automatically have the date appended at the end (you can customize the format if you don't like the default one). It would avoid the need for a symlink.
Hello! Firstly, thank you guys for the great project. I've been using it in my production environment and it's very convenient.
But it is not that smooth while using the rotation, which creates massive log files and it's a bit cumbersome for me to access the newest one every time I search for an entry. More specifically, I have to find the one with the smallest mtime (yes, it could be done with the help of
ls
options) first, then enter the suffix of the target file since they all share the same prefix so that autocomplete won't work perfectly.So I wonder whether there is any way to create a symbolic link that always points to the latest log file, just as what glog's
SetLogSymlink
does, to facilitate my search process. I've searched for the keywordsymbolic link
in the document but found nothing, so I come here for advice.The text was updated successfully, but these errors were encountered: