• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

log file path in weblogic

 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ?
 
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try using an absolute path instead
 
srini carry
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
 
drifter
Posts: 1364
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Anderson gave himself the promotion. So I gave myself this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!