Log4j

hellohow to use log4j in web apllication regards
[69 byte] By [the_Orienta] at [2007-11-26 22:26:22]
# 1
private static Logger l = Logger.getLogger(YourClass.class.getName());bye aldo
uihytffghjka at 2007-7-10 11:27:49 > top of Java-index,Java Essentials,Java Programming...
# 2

Place this two files in your classpath,

[commons-logging.properties]

org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog

[simplelog.properties]

org.apache.commons.logging.simplelog.defaultlog=warn

#trace

#debug

#info

#warn

#error

#fatal

uihytffghjka at 2007-7-10 11:27:49 > top of Java-index,Java Essentials,Java Programming...
# 3
http://jakarta.apache.org/commons/logging/guide.htmlfor complete guidebyealdo
uihytffghjka at 2007-7-10 11:27:49 > top of Java-index,Java Essentials,Java Programming...
# 4
whats about the output files ?
the_Orienta at 2007-7-10 11:27:49 > top of Java-index,Java Essentials,Java Programming...
# 5

> whats about the output files ?

Decide where you want to put them. (Not inside the web application.) Configure the log4j.properties file so that the loggers write to where you decided. Put the log4j.properties file in your classpath. (The WEB-INF/classes directory is in your classpath.)

DrClapa at 2007-7-10 11:27:49 > top of Java-index,Java Essentials,Java Programming...
# 6
http://www.vipan.com/htdocs/log4jhelp.html
suparenoa at 2007-7-10 11:27:49 > top of Java-index,Java Essentials,Java Programming...