-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Logging to disk by default #202
Comments
Yes we should disable A little overview on how nginx logs work. Nginx supports two built-in logs:
The "File Log" logs We can't turn off |
So we're basically stuck putting Kong's custom access logs into nginx's own |
Also when looking at the File Log plugin format I can't help but think it needs some attention. It starts with Lua specific stuff, turns into stringified JSON and then ends in a weird sentence.
|
@montanaflynn you see that format because that's the format that nginx internally logs messages, so the "File Log" plugin doesn't break any nginx log parser, and the We could create our own file handler and write to a custom file as long as it's non-blocking. |
Maybe "break" was the wrong word but it will affect any existing tools that monitor nginx error logs since by default they don't put access logs or JSON in the |
|
Now the file log plugin supports a file path in the |
Former-commit-id: 8c1276c3b6f0b5a9b382bab1df55fdb7532b52e5
Shouldn't Kong not be logging to files by default? As of now installations are writing to
access.log
anderror.log
. Writing to disk for every request will slow Kong down plus we have a plugin for file logging.If you're using Kong and enable the file logging plugin it will write to the same
errors.log
file that is also being written to for nginx errors, which would cause problems for any existing nginx log parsers.Since the file logging plugin does more then just log errors, maybe it should be split into two logs, one for access and the other for errors with a choice to enable one or the other or both. It would be nice if the log paths are customizable as well.
Here are my suggestions:
access.log
&errors.log
logging by default, make them an option inkong.yml
kong-access.log
andkong-errors.log
The text was updated successfully, but these errors were encountered: