Skip to content
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

LoggingMDCFilter lacks documentation #303

Closed
greenrd opened this issue Feb 11, 2016 · 3 comments
Closed

LoggingMDCFilter lacks documentation #303

greenrd opened this issue Feb 11, 2016 · 3 comments

Comments

@greenrd
Copy link

@greenrd greenrd commented Feb 11, 2016

The User Guide only says that it exists for integration purposes, not what it does exactly, why it does it, or most importantly, how to actually use it. A worked example would be helpful.

@cacoco
Copy link
Member

@cacoco cacoco commented Feb 16, 2016

@greenrd Are you referring to http://twitter.github.io/finatra/user-guide/logging/#mdc?

We link to Logback's documentation on the 'Mapped Diagnostic Context' as we'd prefer not to re-write that documentation. Additionally we link to the source of the LoggingMDCFilter which clearly states in it's scaladoc that it's for initializing and clearing the Logback mapped diagnostic context. Lastly, the LoggingMDCFilter is applied like any other filter (thus you can follow the documentation for filters) with the stated caveat that it should come first in your filter chain.

Please let us know what other documentation we can provide.

Thanks!

@greenrd
Copy link
Author

@greenrd greenrd commented Feb 16, 2016

I don't think it works like magic, does it? I mean, if you put something into the MDC, the LoggingMDCFilter won't just magically transfer what you put into the MDC into different threads for you, will it?

@scosenza
Copy link
Contributor

@scosenza scosenza commented Feb 16, 2016

Hi Robin,

The "magic" happens in FinagleMDCAdapter which is installed after
LoggingMDCFilter calls FinagleMDCInitializer.init(). And yes, any MDC
attributes will be properly propagated throughout each future chain.

Enjoy,
Steve

On Tuesday, February 16, 2016, Robin Green notifications@github.com wrote:

I don't think it works like magic, does it? I mean, if you put something
into the MDC, the LoggingMDCFilter won't just magically transfer what you
put into the MDC into different threads for you, will it?


Reply to this email directly or view it on GitHub
#303 (comment).

-Steve

Sent from Gmail Mobile

@cacoco cacoco closed this Feb 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants