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

Check Kong log rotation and longevity #110

Open
Conal-Tuohy opened this issue Nov 22, 2018 · 1 comment
Open

Check Kong log rotation and longevity #110

Conal-Tuohy opened this issue Nov 22, 2018 · 1 comment

Comments

@Conal-Tuohy
Copy link
Collaborator

Where/how log actual usage over multiple years? eg. might be in a different log?

@Conal-Tuohy
Copy link
Collaborator Author

The default setup keeps Kong's logs indefinitely, at /usr/local/kong/logs. The logs are fairly small, so there's no real concern, but a rotating log would be an improvement.

Kong's regular "file" log does not support rotation, because it retains the open file handle for a log file even after it's been rotated. However, Kong (or nginx, really) can also be set to log using syslog:
http://nginx.org/en/docs/syslog.html
http://nginx.org/en/docs/ngx_core_module.html#error_log

If we log to syslog we could use logrotate to rotate the logs as we do with the tomcat apps. e.g. /etc/logrotate.d/tomcat8 has

/var/log/tomcat8/catalina.out {
  copytruncate
  weekly
  rotate 52
  compress
  missingok
  create 640 tomcat8 adm
}```

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

No branches or pull requests

1 participant