IntelliJ Java IDE
The moose likes Other Open Source Projects and the fly likes log file path Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Reply Bookmark "log file path" Watch "log file path" New topic
Author

log file path

ram kri
Greenhorn

Joined: Dec 08, 2005
Posts: 12
i am using log4j api for creating log file

how can i give the path of creating log file in log4j.properties file


windows 2000 is my O.S
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13433
I did it this way:

log4j.appender.dest1.file=${catalina.base}${file.separator}logs${file.separator}my-app.log


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 13842

I did it like this:

log4j.appender.standard.file=C:/CMWeb/Log/standard.log
Bear Bibeault
Author and opinionated walrus
Marshal

Joined: Jan 10, 2002
Posts: 50693

Moved to the Other Open Source Projects forum.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
LAT_kNos
Greenhorn

Joined: Dec 12, 2005
Posts: 5
Yeah both of them works well.
 
IntelliJ Java IDE
 
subject: log file path
 
Threads others viewed
How to create log file outside application
Help Please -log4j:WARN No appenders could be found for logger
maintaining a log file on server(Linux-Apachi)
Tomcat crashes
Weblogic 9.2 + log4j : Adding path to log file not working
MyEclipse, The Clear Choice