[JBoss-user] [JBossCache] - Re: how to deactivate logging
Re: log4j.xml, try the following: | | | | | | | | | | | | | | | | | I didn't test this, but it's the basic idea. I'm sure the log4j site has some docs on the proper syntax. In the JBossCache dist under the /etc directory there is a log4j.xml that you can look at as well. Re: using other loggers: JBossCache uses commons-logging for all logging operations. Unfortunately, in one place an import dependency on log4j snuck into the code. But the effect of this is just that log4j.jar has to be on the classpath. Otherwise you can tell commons-logging to use whatever logging framework you want, including NoOpLogger, either by putting a commons-logging.properties file on the classpath or by setting a system property. The import dependency on log4j will be fixed in the final version of 1.2.4 (it's still there in the beta). View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3899034#3899034 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3899034 --- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBossCache] - Re: how to deactivate logging
Hey, thanks for the print_local_addr tip, that worked just like I wanted. I still get the rest of the STDERR messages however, and I have changed my log4j.xml to : | | | | | | | | | | | | | | | | results in : 0 [main] WARN cache.TreeCache - No transaction manager lookup class has been defined. Transactions cannot be used 0 [main] INFO cache.TreeCache - interceptor chain is: class org.jboss.cache.interceptors.CallInterceptor class org.jboss.cache.interceptors.LockInterceptor class org.jboss.cache.interceptors.UnlockInterceptor class org.jboss.cache.interceptors.ReplicationInterceptor 0 [main] INFO cache.TreeCache - cache mode is REPL_SYNC 297 [DownHandler (UDP)] INFO protocols.UDP - sockets will use interface 192.168.5.102 313 [DownHandler (UDP)] INFO protocols.UDP - socket information: local_addr=192.168.5.102:2387, mcast_addr=230.0.0.1:2932, bind_addr=/192.168.5.102, ttl=64 sock: bound to 192.168.5.102:2387, receive buffer size=8, send buffer size=15 mcast_recv_sock: bound to 192.168.5.102:2932, send buffer size=15, receive buffer size=8 mcast_send_sock: bound to 192.168.5.102:2388, send buffer size=15, receive buffer size=8 2329 [Thread-20] INFO cache.TreeCache - viewAccepted(): new members: [192.168.5.102:2387] 2329 [main] INFO cache.TreeCache - state could not be retrieved (must be first member in group) 2329 [main] WARN cache.TreeCache - No transaction manager lookup class has been defined. Transactions cannot be used 2329 [main] INFO cache.TreeCache - interceptor chain is: class org.jboss.cache.interceptors.CallInterceptor class org.jboss.cache.interceptors.LockInterceptor class org.jboss.cache.interceptors.UnlockInterceptor 2329 [main] INFO cache.TreeCache - cache mode is local, will not create the channel 2344 [Thread-20] INFO cache.TreeCache - new cache is null (maybe first member in cluster) - So, even if I use log4j, I still can't get rid of these messages. Is there something wrong with my log4j configuration? Also, I don't want to assume that end users for this application will have log4j installed. I'd still like to go in the direction of making a custom NO-OP logger if this is possible. I just didn't see any way to extend a JBossCache logger interface or a method/constructor that sets the logger for me. -Do I have to use Log4j? -Is a custom logger possible? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3899000#3899000 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3899000 --- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBossCache] - Re: how to deactivate logging
RE: the WARN and INFO messages you're seeing, I don't think "severe" is a log4j level. AFAIK the valid levels are DEBUG, INFO, WARN, ERROR and FATAL. Looks like you want to limit org.jboss.cache and org.jgroups to "ERROR". RE: the GMS message that is written to STDOUT, this can be disabled as part of the JGroups protocol stack config in the -service.xml file that configures your JBossCache. Look in the Change the "print_local_addr" attribute to false. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3898832#3898832 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3898832 --- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBossCache] - Re: how to deactivate logging
Suppressing STDERR and STDOUT is not a viable option, other parts of the application may have valid console output. I can suppress all the STDERR messages, denoted in my previous post by italics, by disabling all commons logging. -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog However, other parts of the application need to be able to log. I can't suppress all the log messages with this option. I think that since I can turn off the STDERR output by turning off commons logging, that there should be a way to suppress these logs. Either with a JBossCache option, or by providing a custom Logger for JBossCache. Is this possible? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3898819#3898819 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3898819 --- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBossCache] - Re: how to deactivate logging
If you are trying to suppress stdout and stderr messages, pipe these to /dev/null? Changing the logging toolkit would not help you here... View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3898755#3898755 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3898755 --- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBossCache] - Re: how to deactivate logging
I decided that severe logs may not be an issue. I have attempted to just log severe logs, however, I still get numerous logs to STDERR. My log4j.xml: | | | | http://jakarta.apache.org/log4j/";> | | | | | | | | | | | | | | | | | | | | | 0 [main] WARN cache.TreeCache - No transaction manager lookup class has been defined. Transactions cannot be used 16 [main] INFO cache.TreeCache - interceptor chain is: class org.jboss.cache.interceptors.CallInterceptor class org.jboss.cache.interceptors.LockInterceptor class org.jboss.cache.interceptors.UnlockInterceptor class org.jboss.cache.interceptors.ReplicationInterceptor 16 [main] INFO cache.TreeCache - cache mode is REPL_SYNC 250 [DownHandler (UDP)] INFO protocols.UDP - sockets will use interface 192.168.5.102 266 [DownHandler (UDP)] INFO protocols.UDP - socket information: local_addr=192.168.5.102:1408, mcast_addr=230.0.0.1:2932, bind_addr=/192.168.5.102, ttl=64 sock: bound to 192.168.5.102:1408, receive buffer size=8, send buffer size=15 mcast_recv_sock: bound to 192.168.5.102:2932, send buffer size=15, receive buffer size=8 mcast_send_sock: bound to 192.168.5.102:1409, send buffer size=15, receive buffer size=8 --- GMS: address is 192.168.5.102:1408 --- 2281 [main] INFO cache.TreeCache - state could not be retrieved (must be first member in group) 2281 [main] WARN cache.TreeCache - No transaction manager lookup class has been defined. Transactions cannot be used 2281 [main] INFO cache.TreeCache - interceptor chain is: class org.jboss.cache.interceptors.CallInterceptor class org.jboss.cache.interceptors.LockInterceptor class org.jboss.cache.interceptors.UnlockInterceptor 2281 [main] INFO cache.TreeCache - cache mode is local, will not create the channel service started press enter to exit 2297 [Thread-8] INFO cache.TreeCache - viewAccepted(): new members: [192.168.5.102:1408] 2297 [Thread-8] INFO cache.TreeCache - new cache is null (maybe first member in cluster I noticed the GMS message was not STDERR but instead STDOUT. If I changed the root appender info to : I still get the same output. Am I using Log4j incorrectly? Is there a way to have JBossCache use an alternative logger as a workaround? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3898723#3898723 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3898723 --- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBossCache] - Re: how to deactivate logging
In your log4j xml file, exclude all messages generated from org.jboss.cache.* and org.jgroups.* in your appender. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3898441#3898441 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3898441 --- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user