Well. lets' start with the "simple" case: This is the source of java stand alone program:
package cachiamo; import org.jboss.cache.*; public class Principale { public static void main(String[] args) throws Exception { TreeCache tree = new TreeCache(); PropertyConfigurator config = new PropertyConfigurator(); config.configure(tree, "META-INF/mioreplSync-service.xml"); tree.setClusterName("pippo"); tree.startService(); tree.destroyService(); } } __________________________________ This is log4j.xml contents: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <!-- ===================================================================== --> <!-- --> <!-- Log4j Configuration --> <!-- --> <!-- ===================================================================== --> <!-- $Id: log4j.xml,v 1.5 2005/06/09 15:54:45 bela Exp $ --> <!-- | For more configuration infromation and examples see the Jakarta Log4j | owebsite: http://jakarta.apache.org/log4j --> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false"> <!-- ================================= --> <!-- Preserve messages in a local file --> <!-- ================================= --> <!-- A time/date based rolling appender --> <!-- Rollover at midnight each day --> <param name="DatePattern" value="'.'yyyy-MM-dd"/> <!-- Rollover at the top of each hour <param name="DatePattern" value="'.'yyyy-MM-dd-HH"/> --> <!-- The default pattern: Date Priority [Category] Message\n --> <!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n --> <!-- ============================== --> <!-- Append messages to the console --> <!-- ============================== --> <!-- The default pattern: Date Priority [Category] Message\n --> <!-- ================ --> <!-- Limit categories --> <!-- ================ --> <!-- Limit JBoss categories to INFO --> <!-- Increase the priority threshold for the DefaultDS category --> <!-- Decrease the priority threshold for the org.jboss.varia category --> <!-- | An example of enabling the custom TRACE level priority that is used | by the JBoss internals to diagnose low level details. This example | turns on TRACE level msgs for the org.jboss.ejb.plugins package and its | subpackages. This will produce A LOT of logging output. --> <!-- ======================= --> <!-- Setup the Root category --> <!-- ======================= --> <appender-ref ref="CONSOLE"/> <!-- <appender-ref ref="FILE"/>--> </log4j:configuration> (it is just the log4j.xml shipped with JBosscache distribution) ______________________________________ This is the launch command of the program: Q:\remote\jdk\jdk1.3.1_05\bin\java -Dlog4j.configuration=log4j.xml -classpath "C:\JBuilder8\progetti\cache\xml;P:\bea\weblogic700\server\lib\weblogic.jar;C:\JBuilder8\progetti\cache\classes;D:\jbosscachebueo\jdk13\commons-logging.jar;D:\jbosscachebueo\jdk13\concurrent.jar;D:\jbosscachebueo\jdk13\javassist.jar;D:\jbosscachebueo\jdk13\jboss-cache.jar;D:\jbosscachebueo\jdk13\jboss-common.jar;D:\jbosscachebueo\jdk13\jboss-jmx.jar;D:\jbosscachebueo\jdk13\jboss-system.jar;D:\jbosscachebueo\jdk13\jgroups-all.jar;Q:\remote\jdk\jdk1.3.1_05\jre\lib\i18n.jar;Q:\remote\jdk\jdk1.3.1_05\jre\lib\jaws.jar;Q:\remote\jdk\jdk1.3.1_05\jre\lib\rt.jar;Q:\remote\jdk\jdk1.3.1_05\jre\lib\sunrsasign.jar;Q:\remote\jdk\jdk1.3.1_05\lib\dt.jar;Q:\remote\jdk\jdk1.3.1_05\lib\htmlconverter.jar;Q:\remote\jdk\jdk1.3.1_05\lib\tools.jar" cachiamo.Principale (Directory C:\JBuilder8\progetti\cache\xml contains file logj4.xml and file META-INF\mioreplSync-service.xml. This directory is, of course, in the classpath.) _____________________________________ The output produced is: [INFO] PropertyConfigurator - -Found existing property editor for org.w3c.dom.Element: [EMAIL PROTECTED] [INFO] PropertyConfigurator - -configure(): attribute size: 13 [INFO] TreeCache - -setting cluster properties from xml to: UDP(bind_addr=1.6.64.159;ip_mcast=true;ip_ttl=64;loopback=true;mcast_addr=228.1.2.3;mcast_port=48866;mcast_recv_buf_size=80000;mcast_send_buf_size=150000;ucast_recv_buf_size=80000;ucast_send_buf_size=150000):PING(down_thread=false;num_initial_members=3;timeout=2000;up_thread=false):MERGE2(max_interval=20000;min_interval=10000):FD_SOCK:VERIFY_SUSPECT(down_thread=false;timeout=1500;up_thread=false):pbcast.NAKACK(down_thread=false;gc_lag=50;max_xmit_size=8192;retransmit_timeout=600,1200,2400,4800;up_thread=false):UNICAST(down_thread=false;min_threshold=10;timeout=600,1200,2400;window_size=100):pbcast.STABLE(desired_avg_gossip=20000;down_thread=false;up_thread=false):FRAG(down_thread=false;frag_size=8192;up_thread=false):pbcast.GMS(join_retry_timeout=2000;join_timeout=5000;print_local_addr=true;shun=true):pbcast.STATE_TRANSFER(down_thread=true;up_thread=true) [INFO] 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 [INFO] TreeCache - -cache mode is REPL_SYNC [INFO] UDP - -sockets will use interface 1.6.64.159 [INFO] UDP - -socket information: local_addr=1.6.64.159:2625, mcast_addr=228.1.2.3:48866, bind_addr=ic2302299.ic.intra.infocamere.it/1.6.64.159, ttl=64 sock: bound to 1.6.64.159:2625, receive buffer size=80000, send buffer size=150000 mcast_recv_sock: bound to 1.6.64.159:48866, send buffer size=150000, receive buffer size=80000 mcast_send_sock: bound to 1.6.64.159:2626, send buffer size=150000, receive buffer size=80000 [INFO] TreeCache - -viewAccepted(): new members: [1.6.64.159:2625] [INFO] TreeCache - -new cache is null (maybe first member in cluster) [INFO] TreeCache - -state could not be retrieved (must be first member in group) ______________________________ Then, I removed the file log4j.xml from directory C:\JBuilder8\progetti\cache\xml. The output produced is: [INFO] PropertyConfigurator - -Found existing property editor for org.w3c.dom.Element: [EMAIL PROTECTED] [INFO] PropertyConfigurator - -configure(): attribute size: 13 [INFO] TreeCache - -setting cluster properties from xml to: UDP(bind_addr=1.6.64.159;ip_mcast=true;ip_ttl=64;loopback=true;mcast_addr=228.1.2.3;mcast_port=48866;mcast_recv_buf_size=80000;mcast_send_buf_size=150000;ucast_recv_buf_size=80000;ucast_send_buf_size=150000):PING(down_thread=false;num_initial_members=3;timeout=2000;up_thread=false):MERGE2(max_interval=20000;min_interval=10000):FD_SOCK:VERIFY_SUSPECT(down_thread=false;timeout=1500;up_thread=false):pbcast.NAKACK(down_thread=false;gc_lag=50;max_xmit_size=8192;retransmit_timeout=600,1200,2400,4800;up_thread=false):UNICAST(down_thread=false;min_threshold=10;timeout=600,1200,2400;window_size=100):pbcast.STABLE(desired_avg_gossip=20000;down_thread=false;up_thread=false):FRAG(down_thread=false;frag_size=8192;up_thread=false):pbcast.GMS(join_retry_timeout=2000;join_timeout=5000;print_local_addr=true;shun=true):pbcast.STATE_TRANSFER(down_thread=true;up_thread=true) [INFO] 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 [INFO] TreeCache - -cache mode is REPL_SYNC [INFO] UDP - -sockets will use interface 1.6.64.159 [INFO] UDP - -socket information: local_addr=1.6.64.159:2631, mcast_addr=228.1.2.3:48866, bind_addr=ic2302299.ic.intra.infocamere.it/1.6.64.159, ttl=64 sock: bound to 1.6.64.159:2631, receive buffer size=80000, send buffer size=150000 mcast_recv_sock: bound to 1.6.64.159:48866, send buffer size=150000, receive buffer size=80000 mcast_send_sock: bound to 1.6.64.159:2632, send buffer size=150000, receive buffer size=80000 [INFO] TreeCache - -viewAccepted(): new members: [1.6.64.159:2631] [INFO] TreeCache - -new cache is null (maybe first member in cluster) [INFO] TreeCache - -state could not be retrieved (must be first member in group) (I dont' see any difference.) __________________________________ Then, I modified log4j.xml in this way: I modified WARN in the following lines with FATAL This is the output after the modification: [INFO] PropertyConfigurator - -Found existing property editor for org.w3c.dom.Element: [EMAIL PROTECTED] [INFO] PropertyConfigurator - -configure(): attribute size: 13 [INFO] TreeCache - -setting cluster properties from xml to: UDP(bind_addr=1.6.64.159;ip_mcast=true;ip_ttl=64;loopback=true;mcast_addr=228.1.2.3;mcast_port=48866;mcast_recv_buf_size=80000;mcast_send_buf_size=150000;ucast_recv_buf_size=80000;ucast_send_buf_size=150000):PING(down_thread=false;num_initial_members=3;timeout=2000;up_thread=false):MERGE2(max_interval=20000;min_interval=10000):FD_SOCK:VERIFY_SUSPECT(down_thread=false;timeout=1500;up_thread=false):pbcast.NAKACK(down_thread=false;gc_lag=50;max_xmit_size=8192;retransmit_timeout=600,1200,2400,4800;up_thread=false):UNICAST(down_thread=false;min_threshold=10;timeout=600,1200,2400;window_size=100):pbcast.STABLE(desired_avg_gossip=20000;down_thread=false;up_thread=false):FRAG(down_thread=false;frag_size=8192;up_thread=false):pbcast.GMS(join_retry_timeout=2000;join_timeout=5000;print_local_addr=true;shun=true):pbcast.STATE_TRANSFER(down_thread=true;up_thread=true) [INFO] 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 [INFO] TreeCache - -cache mode is REPL_SYNC [INFO] UDP - -sockets will use interface 1.6.64.159 [INFO] UDP - -socket information: local_addr=1.6.64.159:2923, mcast_addr=228.1.2.3:48866, bind_addr=ic2302299.ic.intra.infocamere.it/1.6.64.159, ttl=64 sock: bound to 1.6.64.159:2923, receive buffer size=80000, send buffer size=150000 mcast_recv_sock: bound to 1.6.64.159:48866, send buffer size=150000, receive buffer size=80000 mcast_send_sock: bound to 1.6.64.159:2924, send buffer size=150000, receive buffer size=80000 [INFO] TreeCache - -viewAccepted(): new members: [1.6.64.159:2923] [INFO] TreeCache - -new cache is null (maybe first member in cluster) [INFO] TreeCache - -state could not be retrieved (must be first member in group) Output doesn't change. I am not able to control the behavior of logging in JBosscache/JGroups. regards matabo View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3960274#3960274 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3960274 _______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user