-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use logrotate instead of custom script #50
Comments
Looks interesting. I am looking for something to provide purging of all logs, as well as world and server backups. This might be a partial or total solution. |
From the man page it looks as though it would be useful for rotating Looks like it would be a better tool than the wheel reinvention I have in place at the moment. |
|
I've played around with a config file which you can put in /etc/logrotate.d/ . You can test configs with logrotate -d -f
The issue with this is old logs are located in separate folders for each server in /opt/msm/archive/logs/ which cannot be interpreted to the olddir directive. If a unified folder is used for all the servers there is a conflict of names, because all the logs are named server.log. What I think could work is something like this where each server is appended after its created with MSM
Sample append in server_create() for example
This will most likely work, but will be difficult to manage if a server is removed |
Why don't you use logrotate for rolling over logs?
It's directly built into debian and supports restarting services and loads of other stuff.
You don't even need a cronjob, single file in
/etc/logrotate.d
and you're done.It has loads of config options.
The text was updated successfully, but these errors were encountered: