mozilla-services / iprepd-nginx

Openresty nginx module for integrating with iprepd
https://github.com/mozilla-services/iprepd
Mozilla Public License 2.0
9 stars 5 forks source link

Feature request: Emit logs as JSON #22

Open jbuck opened 5 years ago

jbuck commented 5 years ago

Right now this nginx module emits logs as unstructured text. Would it be possible to switch to a JSON format so that it's possible to search through the nginx logs more easily? Thanks!

ajvb commented 5 years ago

@jbuck Would it be possible to have logs emitted to something like a fluentd collector? Openresty is limited by nginx APIs, so all there really is ngx.log, which does not support formatting options. But, it would be easy to write a limit custom logger similar to something like this - https://github.com/mediba-system/lua-resty-fluent-logger - that sends json objects to a socket.

jbuck commented 5 years ago

Maybe, but I'm not sure how the fluentd process is configured on GKE