This week's book giveaways are in the Scala and Android forums.
We're giving away four copies each of Machine Learning Systems: Designs that scale and Xamarin in Action: Creating native cross-platform mobile apps and have the authors on-line!
See this thread and this one for details.
Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

creating application log at path specified in Linux  RSS feed

 
Ranch Hand
Posts: 762
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use this

 
Ranch Hand
Posts: 1325
Android Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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 ]
  •  
    It is sorta covered in the JavaRanch Style Guide.
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!