-
Notifications
You must be signed in to change notification settings - Fork 186
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
Need to disable Waffle logs for DEBUG waffle.apache.NegotiateAuthenticator #548
Comments
Copying sample log file here, 2017-09-13 18:48:14 Commons Daemon procrun stdout initialized |
If you were using Tomcat, you would put this in Now I think you need the following in your logback config file.
Would be nice to update docs/FAQs/whatever when you figure it out. |
You could also put together a working sample with |
It is easy to run into difficulties with tomcat logging with current Waffle distribution, as it contains logback-classic & logback-core jars. This causes waffle logging to go to logback (obviously), not to Tomcat's logging system. To get log messages there, one must leave logback jars away from Tomcat's lib and put slf4j-jdk14 jar there. After that, adjusting logging with Tomcat's logging.properties works. |
@dblock , thanks for your input. logback config file changes is not helping again. I can try creating sample app for reference. |
@AriSuutariST , I am using waffle with 3rd party web app (rdf4j-server), rdf4j-server uses logback lib - How do I do this? (Should I take rdf4j-server app code and compile it with slf4j lib) I am from .net background. Thanks for your help :( |
Where do I keep log configuration file? As of now, I am keeping under webapp (c:\apache-tomcat\webapps\rdf4j-server\WEB-INF\classes\logback.xml) Nothing happens when i make changes in this file. I am not sure where do I need to keep the configuration file. |
Because you are using Valve, the logging configuration under webapp (WEB-INF/classes) is not used. I would try to same setup that we use for plain tomcat:
|
Removing logback libraries was not helping sine RDF4J-SERVER needs it. I just copied logback.xml into c:\apache-tomcat\lib\ folder where the waffle jar files are available. It started logging into different file as per configuration file and debug information are stopped getting logged. My assumption is, the log configuration file was not in right place :) |
Something should come out of this thread, like an FAQ or doc, cause logging in these thing is always such a PITA. |
Yes, I can update FAQ or DOC. I will create document under waffle/Docs/tomcat/. Is it okay? |
Yes, please. |
@balab2020 Yes please add FAQ when you get some time. Logging, while seemingly easy, tends to have issues due to far too many logging variations. No harm in using your example in FAQ as well. I've never heard of RDF4J-SERVER before but I suspect using the example like that might help others in situations of similar usage of products that are not maybe on the radar ;) |
Created PR #569 |
I have added the below tag in standalone.xml file and the issue got resolved:
|
**
> Libraries : waffle-jna-1.8.2.jar, waffle-tomcat9-1.8.2.jar, logback-classic-1.1.3.jar
**
I am using Waffle with rdf4jserver (https://github.com/eclipse/rdf4j). When I start the service and run application for longer time, it just overflows the log file (rdfstore-stdout.2017-09-13.log) in GBs. The log file has only related information with respect to DEBUG waffle.apache.NegotiateAuthenticator.
I tried disabling the DEBUG logs in logging.properties with below entries
waffle.servlet.NegotiateSecurityFilter.level = ERROR
waffle.servlet.spi.SecurityFilterProviderCollection.level = ERROR
waffle.servlet.spi.NegotiateSecurityFilterProvider.level = ERROR
waffle.servlet.spi.BasicSecurityFilterProvider.level = ERROR
no luck :( . There is mail thread on google groups on the same issue here https://groups.google.com/forum/#!searchin/waffle-users/log%7Csort:relevance/waffle-users/-sS5lxXO59M/7LOmMJOXyboJ. There is no concrete solution. I am basically from .Net & Javascript background and not able to understand the issue as well.
I need solution to fix the problem. Where do I need to keep logback configuration file and how to roll it out with max file size.
Additional information:
1. Configuration file to integrate waffle with rdf4jserver
<Context>
<Valve className="waffle.apache.NegotiateAuthenticator" principalFormat="fqn" roleFormat="both"
protocols="Negotiate,NTLM" />
<Realm className="waffle.apache.WindowsRealm" />
</Context>
2. Logback configuration file (located at C:\apache-tomcat\webapps\rdf4j-server\WEB-INF\classes)
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="org.eclipse.rdf4j.common.logging.file.logback.StackTracePatternLayout"/>
</encoder>
</appender>
3. Logging.properties file content
waffle.servlet.NegotiateSecurityFilter.level = FINE
waffle.servlet.spi.SecurityFilterProviderCollection.level = FINE
waffle.servlet.spi.NegotiateSecurityFilterProvider.level = FINE
waffle.servlet.spi.BasicSecurityFilterProvider.level = FINE
4. waffle var files are available at C:\apache-tomcat\lib
Kindly let me know if need any.
The text was updated successfully, but these errors were encountered: