Skip to content
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

Log file rotation should be taken care of by logrotate #4

Open
dgrant opened this issue Oct 1, 2013 · 5 comments
Open

Log file rotation should be taken care of by logrotate #4

dgrant opened this issue Oct 1, 2013 · 5 comments

Comments

@dgrant
Copy link
Owner

dgrant commented Oct 1, 2013

See comment from here: https://code.google.com/p/eyefiserver/issues/detail?id=5#c1 which I agree with: "I'm not sure I want that here. IMHO log rotating should be done by the server maintainance scripts, like logrotate."

It was me who originally committed the log rotation but I agree, that using logrotate is better.

Need to add SigUSR1Handler so that we can handle the SIGUSR1 signal that logrotate uses (this is too avoid using copytruncate option of logrotate which can potentially lead to loss of somes lines of the log).

@dgrant
Copy link
Owner Author

dgrant commented Oct 1, 2013

Anyone who runs eyefiserver on a NAS: what do you prefer?

We could also do our own rotation, but we should allow it to be configurable in the eyefiserver conf file.

@vsimonaitis
Copy link
Collaborator

I guess the log should be cleared on server start ant log output should be minimized.

@dgrant
Copy link
Owner Author

dgrant commented Nov 14, 2013

You mean cleared on server start by the init script in the NAS scenario? I'm thinking in the non-NAS scenario, we just need to log to a fixed location and do no clearing of logs, and no rotation. logrotate should handle everything else, just as it does for all the other logs in /var/log typically.

@vsimonaitis
Copy link
Collaborator

OK, here is the solution: Log rotate should create separate file Every time the server is started. "Clear log" command should also create a new file instead of clearing it (without restastaring the server).
On the NAS Web frontend most current log should be displayed.

BTW David, is the log output size is controlled by config? I mean, for the average user the soap messages should not be logged. All is needed to display transfered files:

  1. Uploading DSC_123456.jpg...
  2. Uploading DSC_123456.jpg... 3.5Mb Done

@dgrant
Copy link
Owner Author

dgrant commented Nov 14, 2013

I'm not sure if we are taking about the same thing here. I'm talking about making eyefiserver2 append log messages to a fixed location and do no rotation. logrotate (the unix command) or some other tool will rotate the logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants