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

Parametrize logging statement in presence of a Throwable #42

Open
oakkitten opened this issue Oct 14, 2015 · 1 comment
Open

Parametrize logging statement in presence of a Throwable #42

oakkitten opened this issue Oct 14, 2015 · 1 comment

Comments

@oakkitten
Copy link

like this: http://www.slf4j.org/faq.html#paramException

@almilli
Copy link

almilli commented May 20, 2016

To be more clear for this issue. When using the SLF4J adapter and using parameterized methods, it doesn't detect the Exception part and instead passes a null Exception to the underlying implementation.

Given this log, it only prints the message and does not include the stack trace.

String myParam = "testing";
Exception exception = new Exception();
log.info("Something happened. {}", myParam, exception);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants