aspose file tools*
The moose likes BEA/Weblogic and the fly likes log  file path in weblogic Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "log  file path in weblogic" Watch "log  file path in weblogic" New topic
Author

log file path in weblogic

srini carry
Ranch Hand

Joined: Nov 30, 2007
Posts: 83
I want to have my logs to go to a specific file in prod environment. below is my log4j.xml



the value for param name File is ./log/myapp.log , I did not find myapp.log anywhere in server , please tell me if the configration is right or what is the correct configration ?
Himanshu Kansal
Ranch Hand

Joined: Jul 05, 2009
Posts: 257
Hello,

I am not very +ve that ./log/myapp.log refers to somewhere in the root of your application. You can check this by creating a simple txt file at that path and see if it goes somewhere and where. Usually these locations refer to the directory where the serer is running from and operate relative to that instead of the applicatio's root.

Once try by giving an absolute path as the value of File parameter and check if that works. If the absolute path works, the above problem would be confirmed.

Regards


Experience and talent are independent of age
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6662
    
    5

Try using an absolute path instead


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
srini carry
Ranch Hand

Joined: Nov 30, 2007
Posts: 83
Himanshu Kansal wrote:Hello,

I am not very +ve that ./log/myapp.log refers to somewhere in the root of your application. You can check this by creating a simple txt file at that path and see if it goes somewhere and where. Usually these locations refer to the directory where the serer is running from and operate relative to that instead of the applicatio's root.

Once try by giving an absolute path as the value of File parameter and check if that works. If the absolute path works, the above problem would be confirmed.

Regards


I cannot give absolute path as we don't deploy application we just deliver the ear file and some other firm deploys this and i hvae no knowledge of domain and server etc .Please help me configure log file
Himanshu Kansal
Ranch Hand

Joined: Jul 05, 2009
Posts: 257
srini carry wrote: I cannot give absolute path as we don't deploy application we just deliver the ear file and some other firm deploys this and i hvae no knowledge of domain and server etc .Please help me configure log file

ok, so can you run a test locally before delivering it into production? I just want to see the app working with absolute path. To get that, there are some ways.

Also please tell which server would it be deployed on, eg: weblogic, websphere etc and the version.

Regards
Carol Enderlin
drifter
Ranch Hand

Joined: Oct 10, 2000
Posts: 1364
FYI: It depends on the version of log4j whether that "log" directory will be created or not. Looks like that was added to log4j in 1.2.12. Before that it would error out on creating file "./log/myapp.log" if directory log didn't exist.
 
 
subject: log file path in weblogic