Return-Path: Delivered-To: apmail-logging-log4j-user-archive@www.apache.org Received: (qmail 14256 invoked from network); 16 May 2005 15:50:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 16 May 2005 15:50:03 -0000 Received: (qmail 73022 invoked by uid 500); 16 May 2005 13:51:12 -0000 Delivered-To: apmail-logging-log4j-user-archive@logging.apache.org Received: (qmail 72894 invoked by uid 500); 16 May 2005 13:51:10 -0000 Mailing-List: contact log4j-user-help@logging.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Log4J Users List" Reply-To: "Log4J Users List" Delivered-To: mailing list log4j-user@logging.apache.org Received: (qmail 72758 invoked by uid 99); 16 May 2005 13:51:06 -0000 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from web25505.mail.ukl.yahoo.com (HELO web25505.mail.ukl.yahoo.com) (217.12.10.151) by apache.org (qpsmtpd/0.28) with SMTP; Mon, 16 May 2005 06:51:04 -0700 Received: (qmail 37733 invoked by uid 60001); 16 May 2005 13:50:53 -0000 Message-ID: <20050516135053.37731.qmail@web25505.mail.ukl.yahoo.com> Received: from [217.26.77.145] by web25505.mail.ukl.yahoo.com via HTTP; Mon, 16 May 2005 14:50:53 BST Date: Mon, 16 May 2005 14:50:53 +0100 (BST) From: Clandes Tino Subject: log4j stops logging at console To: log4j-user@logging.apache.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hello all. I am facing the problem with log4j usage in two separate applications. I am using CONSOLE appenders for both of them. Applications are started separately (in two shell windows). The first app (App1) is assembled as EAR and deployed under JBoss (it uses log4j.jar from JBoss/server/default/lib and initializes log4j through MBean, where appenders and loggers are configured). Here is the method in MBean that configures log4j in App1: ------------------------------------------------------- private void initLog4j() throws ConfigurationException { final Properties props = new Properties(); props.setProperty("log4j.category.com.myapp", �DEBUG, CONSOLE, FILE"); props.setProperty("log4j.appender.CONSOLE","org.apache.log4j.ConsoleAppender"); props.setProperty("log4j.appender.CONSOLE.layout","org.apache.log4j.PatternLayout") props.setProperty("log4j.appender.CONSOLE.layout.ConversionPattern","%d{ISO8601} %-5p [%c{1}] [%X{user}] - %m%n"); props.setProperty("log4j.appender.FILE","org.apache.log4j.RollingFileAppender"); props.setProperty("log4j.appender.FILE.File", getConfigurationSetting(LOG_FILE)); props.setProperty("log4j.appender.FILE.MaxFileSize", getConfigurationSetting(MAX_FILE_SIZE)); props.setProperty("log4j.appender.FILE.MaxBackupIndex", getConfigurationSetting(MAX_BACKUP_FILE)); props.setProperty("log4j.appender.FILE.layout","org.apache.log4j.PatternLayout"); props.setProperty("log4j.appender.FILE.layout.ConversionPattern","%d{ISO8601} %-5p [%c{1}] [%X{user} %X{ip} %X{userAgent}] - %m%n"); PropertyConfigurator.configure(props); } App1 uses A.jar and B.jar from App2 in compilation and runtime. Both jars are placed in sar archive and deployed in default/deploy folder under Jboss. The other (App2) is RMI Server application deployed separately (it uses another log4j-1.2.8.jar placed in its classpath). A.jar and B.jar are in its classpath. App2 configures log4j by log4j properties file: ------------------------------------------------ log4j.category.CONSOLE = , aCONSOLE log4j.appender.aCONSOLE = org.apache.log4j.ConsoleAppender log4j.additivity.CONSOLE=false log4j.appender.aCONSOLE.ImmediateFlush=true log4j.appender.aCONSOLE.layout=org.apache.log4j.PatternLayout -------------------------------------------------- Both applications are physically on the same machine. The problem occurs when some class from App1 invokes a class from B.jar. Then logging disappears from console window of App1. No further message in log appears. However logging into file works OK. My question is: What can cause such behavior? Thanx for the hint in advance. Best regards Milan ___________________________________________________________ How much free photo storage do you get? Store your holiday snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-user-help@logging.apache.org