-
Notifications
You must be signed in to change notification settings - Fork 39
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
Library has a binding on Log4j through SLF4J #14
Comments
Thank you for the report, we are currently looking into this. |
I am having the same problem, please fix it as soon as possible! It's overriding my own logging properties and makes me really sad :( |
@zonder129 you should be able to exclude the usage of log4j binding. I don't have anything to test this with myself right now but something like this for gradle should potentially do it. or
Or for Maven something like (I don't use Maven myself so this might need some work)
|
@Molyna thank you, that is really great workaround, I totally forgot about exclude stuff. Thanks again! |
Thanks @Molyna for the suggestion. For Maven, this exclusion worked for me: <dependency>
<groupId>com.google.actions</groupId>
<artifactId>actions-on-google</artifactId>
<version>1.0.2</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
</dependency> Also, unrelated but if you're in the path of testing on Google App Engine Standard along with Spring Boot framework, you'll need to follow steps from Spring Boot App Engine Standard. Here are some steps, but not limited to. So, make sure you follow steps from the link above. 1) Use Servlet 3.1.0: Do not include the Jetty dependencies. But you must include Servlet API dependency: <dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency> 2) Remove Tomcat Starter After excluding Tomcat, the command
3) Exclude JUL to SLF4J Bridge <!-- Exclude any jul-to-slf4j -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
<scope>provided</scope>
</dependency> |
The log4j dependency has been removed as of https://github.com/actions-on-google/actions-on-google-java/releases/tag/v1.1.0 |
The library can cause a multiple binding and potentially overwrite the bindings on an application depending on it if that application doesn't use Log4j.
As per the SLF4J documentation:
Embedded components such as libraries not only do not need to configure the underlying logging framework, they really should not do so. They should invoke SLF4J to log but should let the end-user configure the logging environment. When embedded components try to configure logging on their own, they often override the end-user's wishes. At the end of the day, it is the end-user who has to read the logs and process them. She should be the person to decide how she wants her logging configured.
The text was updated successfully, but these errors were encountered: