-
-
Notifications
You must be signed in to change notification settings - Fork 172
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
context support #44
context support #44
Conversation
Hi Andrew, thanks for this! I may be misunderstanding the intention a little - what would we gain from making this a Timbre feature over, say, just doing this on the application-side? Remember that appenders are just fns, so you could write an appender that checks+uses the state of a dynamic variable (like In that last example, the appender could be written to check appender args for a map with a Let me know what you think, cheers! :-) |
Anything can be done on application side :) In Timbre it can be "specification" for appenders. And appenders can handle this in their way as doing so in log4j-world with MDC and NDC. Contexts can be used in standard redis appender, and in future standard graylog and splunk appenders. |
Hi Andrew, okay - I'd like a little time to think about this & possible alternatives. Your PR definitely helped clarify your objective, so thanks for that! Will get back to you. Cheers :-) |
Thank you! |
FWIW, we ended up implementing something very similar, using middleware to add the value of a |
Hi Hugo, looks good! Thanks for pinging about this. Your library looks interesting too! Shall I perhaps link to it from the Timbre README, or is it something you're just using internally? |
I'ld be honoured if you linked it. At the moment we're just using this internally, but other users (and contributors) are definitely welcome. Also more than happy should any of the functionality end up in Timbre itself. |
Okay great, just added a link :-) Haven't had a chance yet to look at it in detail, but would certainly be open to PRs that you think might be useful or better-integrated upstream. Have a great weekend, cheers! |
Just suggestion for #42