File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

logging in websphere

Shane Lee
Ranch Hand

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

In my enterprise application deployed on WAS, i am using log4j for logging purposes.
I have setup 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 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.

Paul Clapham

Joined: Oct 14, 2005
Posts: 19973

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.

I agree. Here's the link:
subject: logging in websphere
It's not a secret anymore!