No exceptions but cannot see logs getting created.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Shanika_Weerapperuma
Posted On:   Tuesday, June 1, 2004 01:32 AM

Hi I am a newbie to Log4J trying to configre and execute a simple java class that specifies log entries : log.debug(msg) My class imports the Log4J package and initializes the logger by calling: Logger.getLogger(MyClass.class.getName()) I use an XML file to externally config. the logger and have specified an appender (i am using org.apache.log4j.FileAppender) and set the root to refer to the appender. When i compile and run this class, i don't get any exceptions or errors but i don't see any logs getting created either. Where do the log files created? What i expect is a text file with log entries. (If i am correct must see a log text file named the same name a   More>>

Hi


I am a newbie to Log4J trying to configre and execute a simple java class that specifies log entries :

log.debug(msg)

My class imports the Log4J package and initializes the logger by calling:

Logger.getLogger(MyClass.class.getName())

I use an XML file to externally config. the logger and have specified an appender (i am using org.apache.log4j.FileAppender) and set the root to refer to the appender.

When i compile and run this class, i don't get any exceptions or errors but i don't see any logs getting created either. Where do the log files created?

What i expect is a text file with log entries. (If i am correct must see a log text file named the same name as my Appender)

Any ideas?

thanks

shanika

   <<Less

Re: No exceptions but cannot see logs getting created.

Posted By:   Shanika_Weerapperuma  
Posted On:   Tuesday, June 1, 2004 02:42 AM

I found the solution after doing some research. I have simply missed the log file name that must be specified under the
About | Sitemap | Contact