File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Websphere and the fly likes logging in websphere Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "logging in websphere" Watch "logging in websphere" New topic
Author

logging in websphere

Shane Lee
Ranch Hand

Joined: Mar 19, 2005
Posts: 63
JEE 1.4
Log4j
Websphere ND 6.1.0.17

In my enterprise application deployed on WAS, i am using log4j for logging purposes.
I have setup log4j.properties in each module and running unit tests, logs are created fine in eclipse.

When i deploy my enterprise application in websphere, if i go to my WAS_ROOT\profiles... \installedApps\ProjectName.ear all i see is my jar files, how can i see the logs i create without looking inside the jars?

I know there is a properties folder at WAS_ROOT\profiles\AppSrv01 level and if i place my log4j.properties in here my log files get created at the AppSrv01 level, is there another way to view my logs at my project directory location.

Maybe it is just log4j.appender.C.File value i have to change.

Thanks,
Shane.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18909
    
    8

How can you see the logs you create? Well, you just go to the directory where you specified them to be created and look there.

I would suggest you use an absolute path for that directory. If you use a relative path, at least you should understand what it's relative to. Don't expect it to be relative to any of the applications running in Websphere -- why should it be? Websphere can only have one current working directory.
Shane Lee
Ranch Hand

Joined: Mar 19, 2005
Posts: 63
Thanks paul for the reply.

I actually used a relative path in my properties file for log4j, i can see my log files outside of my application directory on websphere, so its fine now.

Thanks,
Shane.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: logging in websphere