-
Notifications
You must be signed in to change notification settings - Fork 240
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
Update logging.js #491
base: master
Are you sure you want to change the base?
Update logging.js #491
Conversation
May be something like that? For nginx proxy.
This is the perfect opportunity to inject an idea of custom logging that would be tailored for each specific setup. Then, users could design a log system unique to his/her needs. The fallback to using the header "x-forwarded-for" works well for nginx and many systems, but not for every use case. Thoughts? |
Maybe some async method that is given response/request params from each http/https invocation — call. It would obviously be abstracted from the request and independent, implying the http/https call doesn't need to wait until the log has completed. |
We have an open issue for custom logging: #387 Right now we're logging in the standard Apache format. If we change it it would be awesome if it's this sort of customized logging we've been talking about. I'd definitely merge a PR that does this. We could discuss that here, on the original ticket, or in the #geddy IRC channel on Freenode. |
A couple of additional points:
|
All this sounds wonderful, apologies for diverting the logging conversation in this thread. The Apache format is formal and normalized which appears to be the best route. Also, where would the logging methods be implemented into the architecture, global, controller specific, anywhere else? |
There are two parts to the logging question:
https://github.com/mde/geddy/blob/master/lib/app/logging.js#L32 For starters, we'd like that customizable, probably by adding another standard geddy.config value.
https://github.com/mde/geddy/blob/master/lib/cluster/master.js#L43 We would want an API call exposed on the geddy global that allows you to point that output at whatever logger you want. Happy to provide more specifics if people want to dive in and start work on this. |
May be something like that? For nginx proxy.