Files will be rotated if they reach 100MB in size and will have the timestamp of when the rotation took place added to their name. Afterwards, they will be compressed.
This is what the contents of my log folder looks like right now:
The notification.log file will be moved to the new filename, then the server process gets a signal to start writing to a new logfile and then the renamed file will be compressed.
So the specific steps of the rotation process are as like:
The notification.log file will be moved to a new filename with a timestamp, for example, notifications-2023-03-27T10-36-30.148.log.
The server process will receive a signal to start writing to a new log file (a new file notification.log will be generated), which will continue recording logs as usual.
The original file that was renamed (e.g., notifications-2023-03-27T10-36-30.148.log) will be compressed, generating a new compressed file (e.g., notifications-2023-03-27T10-36-30.148.log.gz) to save disk space.
Hi @thanhbui723 and welcome to the Mattermost forums!
No, each file will keep its name and only the date will be added as a suffix to the filename - I hope I understood your question right, if not, please try to rephrase.
I don’t think that this is possible, at least not natively in Mattermost. You could write some small scripts that sync the local logs directory with an S3 bucket and delete the rotated files locally then.