Simple way to getting log4j work for me?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   sunny_vee
Posted On:   Wednesday, July 30, 2003 02:57 AM

Hi, Can anyone share their experiences to get log4j to work in simple words. I actually found this API solve my problem, but when installed it and tried to use it, It became a project of its own. Still I am unable to find a way out and am running out of time. I followed the documentaion and made all the necessary changes in the source code, like imports,static Logger, and logger(). I need to know the following facts. 1. Should I create a 'log4j.properties' myself?, if so where do I put that file. (I saw 'example.log' in log4j docs, but dont know where/how 2 create) 2. I want to see all the logs in a file called 'scriptengine.log' in my project directory. How do I tell   More>>

Hi,

Can anyone share their experiences to get log4j to work in simple words. I actually found this API solve my problem, but when installed it and tried to use it, It became a project of its own. Still I am unable to find a way out and am running out of time.



I followed the documentaion and made all the necessary changes in the source code, like imports,static Logger, and logger(). I need to know the following facts.




1. Should I create a 'log4j.properties' myself?, if so where do I put that file. (I saw 'example.log' in log4j docs, but dont know where/how 2 create)



2. I want to see all the logs in a file called 'scriptengine.log' in my project directory. How do I tell this to log4j?



3.My project dir is d:workspacejavafacadeengine


Folks, I really look forward for your replies. Thanks!.

   <<Less

Re: Simple way to getting log4j work for me?

Posted By:   Christopher_Koenigsberg  
Posted On:   Wednesday, July 30, 2003 06:45 AM

Put your log4j.properties file on your CLASSPATH. For instance in a web application put it in WEB-INF/classes.



You define an Appender, in your log4j.properties, to write to a file, and then you assign the Loggers you want, to that Appender.

About | Sitemap | Contact