The solution was to make sure there is a logger (and related appender)
in the log4j.properties file that matches the name in
Logger.getLogger("some name")

-----Original Message-----
From: Jacob Kjome [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 21, 2005 12:08 AM
To: Log4J Users List
Subject: RE: logging not working

At 02:14 PM 3/17/2005 -0500, you wrote:
 >Hi Todd,
 >When I run the .bat file that uses the api I get this from log4j:
 >-----------
 >log4j:WARN No appenders could be found for logger
 >(bf.cbm.util.io.Loader).
 >log4j:WARN Please initialize the log4j system properly.
 >-----------
 >This seems unrelated since it's not bf.tools.extractor.maps.EZReadMap
 >
 >When I run without the config file I get the same warnings but some of
 >the stdout messages are gone which seems to indicate that the
 >ConsoleAppenders were set up OK.
 >
 >The .bat file executes Java with "
 >-Dlog4j.configuration=log4j.properties " which is the config file name
 >and I'm certain it's in the right location.
 >

Well, in this case "the right location" is the one in the directory
where 
the JVM started.  So, if a file named "log4j.properties" exists in the 
directory corresponding to where you launched your application from,
then 
it is the right location.  Otherwise, it won't be found.  Did you take
this 
into account?

Why not simplify things and just put log4j.properties in the default 
package of your classpath and let Log4j use autoconfiguration.  Don't 
provide the "-Dlog4j.configuration" startup param in this case.  If that

doesn't work, then either there is another log4j.properties that is
getting 
picked up first on your classpath (some naughty libraries include a
Log4j 
config file in their jars) or, related to this, there is a log4j.xml
file 
that is getting picked up, even though your log4j.properties file may
exist 
in a directory or jar that is first on your classpath.  Log4j uses 
log4j.xml files in preference to log4j.properties.


Jake

 >I don't find the extractor.log file anywhere and there are no
 >exceptions.
 >
 >Thanks for your time on this,
 >Russ
 >
 >-----Original Message-----
 >From: Bradley, Todd [mailto:[EMAIL PROTECTED]
 >Sent: Thursday, March 17, 2005 1:57 PM
 >To: Log4J Users List
 >Subject: RE: logging not working
 >
 >> Sooooo...   why doesn't the bf.tool.extractor.maps.EZReadMap Logger
 >> work?
 >
 >What do you mean by "doesn't work"?  Do you get no output at all?  Or
do
 >you get an exception?  Or do you get the wrong output?
 >
 >What happens if you remove the config file altogether?  Do you get a
 >log4j error message to stdout?
 >
 >
 >Todd.
 >
 >---------------------------------------------------------------------
 >To unsubscribe, e-mail: [EMAIL PROTECTED]
 >For additional commands, e-mail: [EMAIL PROTECTED]
 >
 >
 >
 >
 >
 
>***********************************************************************
*****
 >************
 >BENEFITFOCUS.COM CONFIDENTIALITY NOTICE: This electronic message is
intended
 >only for the individual or entity to which it is addressed and may
contain
 >information that is confidential and protected by law. Unauthorized
review,
 >use, disclosure, or dissemination of this communication or its
contents in
 >any way is prohibited and may be unlawful. If you are not the intended
 >recipient or a person responsible for delivering this message to an
intended
 >recipient, please notify the original sender immediately by e-mail or
 >telephone, return the original message to the original sender or to
 >[EMAIL PROTECTED], and destroy all copies or derivations
of the
 >original message. Thank you.  (BFeComNote Rev. 07/29/2003)
 
>***********************************************************************
*****
 >***********
 >
 >---------------------------------------------------------------------
 >To unsubscribe, e-mail: [EMAIL PROTECTED]
 >For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





****************************************************************************************
BENEFITFOCUS.COM CONFIDENTIALITY NOTICE: This electronic message is intended 
only for the individual or entity to which it is addressed and may contain 
information that is confidential and protected by law. Unauthorized review, 
use, disclosure, or dissemination of this communication or its contents in any 
way is prohibited and may be unlawful. If you are not the intended recipient or 
a person responsible for delivering this message to an intended recipient, 
please notify the original sender immediately by e-mail or telephone, return 
the original message to the original sender or to [EMAIL PROTECTED], and 
destroy all copies or derivations of the original message. Thank you.  
(BFeComNote Rev. 07/29/2003)
***************************************************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to