-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
File log #2325
Comments
A simple logrotate config could handle this for you (http://www.linuxcommand.org/man_pages/logrotate8.html). |
What's the correct method to signal to Kong that it should reopen the log file post-rotation? Kong will continue to write to the same file until nginx is restarted or reloaded. A SIGUSR1 will cause nginx to reopen its own logs, but Kong will continue to write to the old one. The file-log plugin appears to only determine the file descriptor the first time it writes a log message. |
@cosmopetrich currently there is support for Kong to close and re-open the FD. We are discussing the appropriate approaches here: in the meantime, you could use the |
@p0pr0ck5 HI. if we use copytruncate,there is a very small time slice between copying the file and truncating it, so some logging data might be lost. How to solve this problem? |
@deepshrift by not using the file log plugin
|
@Tieske |
@satishmane I wasn't aware of that limitation, have you tried the CentOS image? |
@Tieske |
seems to me this is a syslog issue. There is nothing Kong can do to work around those limitations. You could try any of the other logging solutions, tcp/http based? PS. What Kong version are you using? |
@Tieske |
I started using the file log plugin in kong. Is there a way to rotate the logs based on threshold (once it reaches 5mb or so) or rotate the log file daily?
The text was updated successfully, but these errors were encountered: