Return-Path: Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 77893 invoked from network); 3 Jun 2003 07:53:20 -0000 Received: from mta08ps.bigpond.com (144.135.25.169) by daedalus.apache.org with SMTP; 3 Jun 2003 07:53:20 -0000 Received: from migasia.com ([144.135.25.75]) by mta08ps.email.bigpond.com (iPlanet Messaging Server 5.2 HotFix 1.14 (built Mar 18 2003)) with SMTP id <0HFW00GD6B5OPJ@mta08ps.email.bigpond.com> for commons-user@jakarta.apache.org; Tue, 03 Jun 2003 17:51:24 +1000 (EST) Received: from cpe-144-137-65-79.nsw.bigpond.net.au ([144.137.65.79]) by psmam03.bigpond.com(MAM $Name: REL_3_3_2b $ 83/3123206); Tue, 03 Jun 2003 17:51:24 +0000 Date: Tue, 03 Jun 2003 17:52:53 +1000 From: "Jesus M. Salvo Jr." Subject: [Commons-Logging] Using Commons-Logging with an older Log4J ( 1.1.3 ) To: commons-user@jakarta.apache.org Message-id: <3EDC53D5.7010002@migasia.com> MIME-version: 1.0 Content-type: text/plain; charset=UTF-8; format=flowed Content-transfer-encoding: 7BIT X-Accept-Language: en-us, en User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N I am using Commons-Logging against Log4J 1.1.3 I use Commons-Logging like this: *) via System properties: -Dlog4j.configuration=/export/softgame/app_gateway/prod/test/log4j.properties -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JCategoryLog *) within source code: Log logger = LogFactory.getLog( "SMimeFetcher" ); I presume that the String passed in becomes the category name in Log4J. The calls to info() does get outputted via Log4J, ... but they all get logged to Log4J's root category! Interestingly though, I looked at the source code for org.apache.commons.logging.impl.Log4JCategoryLog, and there is no reference to Log4J's Category class, but instead it references Log4J's Logger class. However, Log4J 1.1.3 did not yet have Log4J's Logger class. In short, I would have expected it to NOT work, but it still did. Anyway ... is there any other alternative to reliably using Commons-Logging against Log4J apart from upgrading to the latest Log4J?