This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Log file not created....

 
Ketan Mohite
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • 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
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic