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: Support log rotate? #759
Comments
Hello @mailbaoer, First; do you try to change the |
@kataras sorry for late! I have a long holidays, so did not see it! Waht I want to do is cut log into pieces, like nginx one day one piece or one hour one piece, how can I do this? |
@mailbaoer there is an example over here that shows you how to make daily logs, you can adapt that example to make different intervals of time: |
@speedwheel thank you very much! I will try it later!:thumbsup: |
@mailbaoer You're welcome! |
I feel log rotate is one import feature that we should support! @speedwheel ,as the example code, we should stop our application every day. |
Hello, check the https://github.com/kataras/golog/blob/master/_examples/rotation/main.go example one. |
I use log from example file-logger , but it doesn't say how to rotate the log.
Then I use before hook to check log file name and set log output every query, is that right way?
The text was updated successfully, but these errors were encountered: