logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From AbelMacAdam <abel.maca...@gmail.com>
Subject Using Log4j in an Applet?
Date Fri, 11 Jan 2008 10:21:38 GMT

Hi,

For the Applet I develop I want to log events. I found out I should use
org.apache.log4j.net.SimpleSocketServer. Am I correct in assuming this
SimpleSocketServer can run independently from any Server software?

What I don't know is how I inform my Applet where to send its logging
information to (or put otherwise, I get the following lines in my Eclipse
console:
log4j:WARN No appenders could be found for logger
(nl.domain.myApp.MyApplet).
log4j:WARN Please initialize the log4j system properly.

I made a log4j.properties file, and put it in my WEB-INF/classes directory.
The contents of this file is:
log4j.debug=TRUE
log4j.rootLogger=WARN, R

log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=D:/workspace/myApp/myApp.log
log4j.appender.R.MaxFileSize=100KB
log4j.appender.R.MaxBackupIndex=5
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p %c - %m%n

I use the following command to start the SimpleSocketServer:
java -cp D:\lib\apache-log4j-1.2.15\log4j-1.2.15.jar
org.apache.log4j.net.SimpleSocketServer 13013
d:\workspace\myApp\WEB-INF\classes\log4j.properties

Stating the obvious, a myApp.log is created in the correct place. 



There seems to fail something in my log4j.properties file. Something like a
server (localhost:13013)? What do I add to this file?

TIA
Abel

-- 
View this message in context: http://www.nabble.com/Using-Log4j-in-an-Applet--tp14753143p14753143.html
Sent from the Log4j - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message