• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Log file not created....

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I have a web application which uses Websphere as a web server.
I am trying to log each method in my code for their entering and exiting information.
e.g.
log.debug("**** Entering "+obj.getClass().getName()+" "+message+" ****");
//
//
log.debug("**** Exiting "+obj.getClass().getName()+" "+message+" ****");

In my log4j.properties file,I have set the default file for log as :

log4j.appender.R=org.apache.log4j.DailyRollingFileAppender
log4j.appender.R.File=D:/systime/Ketan/test/Test.log

It works fine on my Test Server, on which I test my code.
But, on Live server this Log information is getting stored in Server's default Log directory which is configured in Websphere, whereas the log file name given in the log4j.properties is not generated only.

Can anyone please suggest, what actually making it to create log in server's default log instead of the file that is mentioned in the log4j.properties

Thanks & Regards,
Ketan
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could it be that WebSphere uses log4j internally, and that it gets its configuration information from some other place?

Since this looks like its more about WebSphere than log4j, I'm moving the thread to our WebSphere forum.
 
Ketan Mohite
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry to trouble you friends,

It was a silly mistake from my side.
Instead of checking in the actual Java file,I was trying to compare the properties files on Live and Test Server.

In the Java file on Live Server,the instead of using log.debug, System.out.println was used which was logging the info in Default_Server_std_out file which is log file for the web server.

Thanks & Regards,
Ketan
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic