This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Servlets and the fly likes creating application log at path specified in Linux Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "creating application log at path specified in Linux" Watch "creating application log at path specified in Linux" New topic
Author

creating application log at path specified in Linux

Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 755
hello guys...

i'm trying to create log file for my application but its not getting created at specified path instead it is creating log file at root

i'm using linux operating system.

how should i specify the path.
above is the log4j.peroperties file where i'm specifing the path.



waiting for your valuable suggestion...

thanks in advance,
[ January 31, 2007: Message edited by: Bear Bibeault ]

Jigar Naik


Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2308
Use this



Rahul Bhattacharjee
LinkedIn - Blog
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1321

Originally posted by Jigar Naik:

log4j.appender.A1.File=//usr//jboss-4.0.2//server//default//log//ToollOG//Tools.log


" // " double forward slash is used for writing comments in Java.

For the path, you could use double backward slash or single forward.

Example:

  • C:\\usr\\jboss-4.0.2\\server\\default\\log\\ToollOG\\Tools.log

  • OR
  • C:/usr/jboss-4.0.2/server/default/log/ToollOG/Tools.log
    [ January 31, 2007: Message edited by: Saif uddin ]

  • Saifuddin..
    [Blog][Linkedin] How To Ask Questions On JavaRanch My OpenSource
     
    Consider Paul's rocket mass heater.
     
    subject: creating application log at path specified in Linux