logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hainer, Neil" <hain...@jivanet.net>
Subject RE: Newbie Question
Date Fri, 11 Jul 2003 16:20:33 GMT
Standalone.  Just part of a java app.

-----Original Message-----
From: Ebersole, Steven [mailto:steven.ebersole@vignette.com]
Sent: Friday, July 11, 2003 12:20 PM
To: 'Log4J Users List'
Subject: RE: Newbie Question


You should not be.  In what type of environment is this running?  In Tomcat?
In an app-server?



-----Original Message-----
From: Hainer, Neil [mailto:hainern@jivanet.net]
Sent: Friday, July 11, 2003 11:11 AM
To: Log4J Users List
Subject: RE: Newbie Question


Steven,

Thanks.  This works, but I still get output to the screen (standard out?) as
well.  Is there a way to prevent this?

Neil

-----Original Message-----
From: Ebersole, Steven [mailto:steven.ebersole@vignette.com]
Sent: Friday, July 11, 2003 12:07 PM
To: 'Log4J Users List'
Subject: RE: Newbie Question


log4j.rootLogger=INFO,FILE
log4j.appender.FILE=org.apache.log4j.FileAppender
log4j.appender.FILE.File=./log.txt
log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
log4j.appender.FILE.layout.conversionPattern=%p -%m%n


Will create a file named log.txt in the current working directory (the
directory from where the java process was started).



-----Original Message-----
From: Hainer, Neil [mailto:hainern@jivanet.net]
Sent: Friday, July 11, 2003 11:02 AM
To: log4j-user@jakarta.apache.org
Subject: Newbie Question



I am using Log4j for the first time.  How do I set up a property file
(correctly) so I only log to a file and not to the console?  I only want
messages at level INFO or higher in my log file.  This is what I tried.  It
didn't work:


log4j.rootLogger = INFO

log4j.DamlBuilder=INFO, FILE

#log4j.appender.CONSOLE=org.appache.log4j.ConsoleAppender

#set the appender FILE
log4j.appender.FILE=org.apache.log4j.FileAppender
log4j.appender.FILE.File=.\log.txt

#set the layout for the appenders
#log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
#log4j.appender.CONSOLE.layout.conversionPattern=%p -%m%n

#set the layout for the appenders
log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
log4j.appender.FILE.layout.conversionPattern=%p -%m%n

Thanks,

Neil

Neil Hainer
Booz Allen & Hamilton
JIVA System Integration Project
703-289-3881


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

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


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

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


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


Mime
View raw message