You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This in relation to #132 . Currently, message always returns an apache-friendly string log. Can we add support for returning the message as JSON?
Ideally, if we are already using Axe, since it provides a normalized standard of logging, we could pass the JSON as metadata, like in here : logger[level](message, metadata);
What I want as JSON would be this
Use case:
So I can send logs to JSON friendly centralized logging systems like DataDog or Papertrail.
Checklist
I have searched through GitHub issues for similar issues.
I have completely read through the README and documentation.
The text was updated successfully, but these errors were encountered:
@abetoots have you updated to the latest major versions of cabin and axe? we now have support for pre and post hooks. you could make an async post hook to send log data as json to datadog, papertrail, wherever.
@abetoots note that the cabin middleware calls the logger (axe) with the request parsed, so you could make a post hook to JSON.stringify or use a package such as fast-safe-stringify to send err, message, and meta to datadog
@abetoots we have added Datadog and Papertrail examples for you, see these below references:
Describe the feature
This in relation to #132 . Currently, message always returns an apache-friendly string log. Can we add support for returning the message as JSON?
Ideally, if we are already using Axe, since it provides a normalized standard of logging, we could pass the JSON as metadata, like in here :
logger[level](message, metadata);
What I want as JSON would be this
Use case:
So I can send logs to JSON friendly centralized logging systems like DataDog or Papertrail.
Checklist
The text was updated successfully, but these errors were encountered: