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

As a library, osm-lib should not depend on a logging implementation #8

Open
abyrd opened this issue Jul 27, 2015 · 1 comment
Open

Comments

@abyrd
Copy link
Member

abyrd commented Jul 27, 2015

osm-lib declares a dependency on Logback, which is an implementation of the slf4j logging API. This causes some weirdness when using osm-lib in other projects. According to the documentation of slf4j:

"Embedded components such as libraries or frameworks should not declare a dependency on any SLF4J binding but only depend on slf4j-api. When a library declares a compile-time dependency on a SLF4J binding, it imposes that binding on the end-user, thus negating SLF4J's purpose. When you come across an embedded component declaring a compile-time dependency on any SLF4J binding, please take the time to contact the authors of said component/library and kindly ask them to mend their ways."

Therefore osm-lib should only depend on slf4j-api.jar, which supplies the API without an implementation, and will default to a no-op implementation.

@abyrd
Copy link
Member Author

abyrd commented Aug 4, 2015

This change has been made. The challenge now is that this disables all logging while working with the library on its own. I suppose we need to include a logger dependency for test scope only, and Vanilla Extract should be an external repository.

abyrd added a commit that referenced this issue Aug 4, 2015
this means that vanilla extract will not produce error messages unless you add a logger implementation to the classpath. as an application, vanilla extract should really be split out into another repository.
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

1 participant