db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Naveen Murthy" <naveen.sriniv...@aricent.com>
Subject RE: Log4J + Torque ... gonna drive me mad.
Date Thu, 31 Jul 2008 15:29:18 GMT
Actually, i dont think those 2 lines coming on ur stdout
means - "log4j will not work for you"
it just means soemhwere, some code is trying to load a 
log4j config file , which doesnt exist. I can assure u
its not fatal, and other apps can continue to use log4j
as long as they provide it with their correct log4j config file.

i see that in my aplication also, may be some 3rd party jar
is failing to provide log4j config. Yet i do my log4j init()
and everything works fine and it spits out the log as required.

just foll the basic guideliens..may be itll help

1. import the log4j stuff
2. declare ur logger
---> public static Logger errorLog = null;

3. Init the log4j properties..(either from a jar, or file ..whatever resource)
InputStream is = xxxBean.class.getClassLoader().getResourceAsStream("/conf/xxx_logging.properties");
Properties props = new Properties();
4. aquire the logger.
errorLog = Logger.getLogger("xxx.ERRORLOG");  //make sure prperty file has this declared...

5. carry on logging!!
errorLog.error(" Naming exception in create() of MDB, error loading configuration info.");

hope this helps...

-----Original Message-----
From: Shinkan [mailto:shinkan@gmail.com]
Sent: Thu 7/31/2008 11:16 AM
To: Apache Torque Users List; alvarocoronel67@yahoo.com
Subject: Re: Log4J + Torque ... gonna drive me mad.
It's a really sad day for all those mates (owh, come on, I'm pretty sure
there's thousand) who have been following this story.
I've expanded all my .jar libs on a folder.
Then I searched for all ".properties" files.
No log4j.properties ... and the only file that mention "log4j" properties
variables is a default one in the log4j .jar.
(Exactly, defaultconfig.properties in org\apache\log4j\lf5\config, in
log4j_(version).jar -- doesn't seem that it can affect)

I'm running out of ideas... (especially that for now I only use YOURS ...)

On Thu, Jul 31, 2008 at 16:41, Alvaro Coronel <alvarocoronel67@yahoo.com>wrote:

> Yep. I think there's another log4j.properties somewhere. Coming to think
> about it, maybe there are several, with all those pesky, verbose libraries
> we get advantage of.
> You running Unix? Try the suggested commands.
> The Windows equivalent would be to expand all the .jar files (easily done
> using multiple-selection and WinRAR), then run a Search on the resulting
> folder tree.
> Go ahead Shinkan, by now I really want to know if there's another
> log4j.properties file somewhere in those jars.
> Best of luck,
> Álvaro

View raw message