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

Static wrapper does not implement the full org.slf4j.Logger interface #40

Open
dabd opened this issue Dec 3, 2014 · 5 comments
Open

Comments

@dabd
Copy link

dabd commented Dec 3, 2014

I'd like to use the methods from the slf4j Logger interface that receive a throwable, like for example public void debug(String msg, Throwable t) but the static wrapper does not implement them.

Trying to decorate the Logger static wrapper won't work either because the decorator won't be able to access this method:
private static org.slf4j.Logger logger(final Object source)

which is crucial to implement the decorator.

How can I workaround this issue?

Thanks.

@yegor256
Copy link
Member

yegor256 commented Dec 4, 2014

@dabd what do you think about adding a new method Logger.info(Object, String, Throwable) to the class? Will this be sufficient?

@dabd
Copy link
Author

dabd commented Dec 4, 2014

That would be sufficient for my needs but I guess you mean adding that signature to the info, error, debug, trace and warn methods right?

Thanks.

@yegor256
Copy link
Member

yegor256 commented Dec 4, 2014

@dabd yes sure, for all five logging levels. Would you be interested to submit a pull request with these changes? Should be easy to implement, I guess.

@dabd
Copy link
Author

dabd commented Dec 4, 2014

It seems easy to implement but I'm a bit tied up at the moment.

@yegor256
Copy link
Member

yegor256 commented Dec 4, 2014

me too, that's why I asked... OK, we'll try to do it.

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