Got it working exactly as I want. thanks everyone. I included my
.properties file below for reference
log4j.rootLogger=INFO, R
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=${catalina.home}/logs/tomcat.log
log4j.appender.R.MaxFileSize=100MB
log4j.appender.R.MaxBacku
Well, you most certainly shouldn't get DEBUG messages in the "R" appender
since the root logger is restricted to the INFO level or higher. Are you sure
that Log4j is using the config file you think it is? Try running with
-Dlog4j.debug=true to find out.
Jake
On Tue, 14 Jul 2009 10:45:05 -
Correct I am getting all the DEBUG/INFO/WARN/FATAL from tabs in the root
logger.
I will try setting additivity to false.
thanks :)
On Tue, Jul 14, 2009 at 10:42 AM, Jacob Kjome wrote:
> Are you saying that you get INFO (as well as WARN, ERROR, and FATAL)
> logging from the "com.tabs" logger (a
Are you saying that you get INFO (as well as WARN, ERROR, and FATAL) logging
from the "com.tabs" logger (and children) in the "R" appender associated with
the rootLogger? That's to be expected, as the "com.tabs" logger (and
children) inherits appenders from parent loggers unless additivity is s
> which then causes all the tabs based logging to occur in a separate
file (defined under the T log definition). The log entries from tabs
are repeated > into the root logger, which is not ideal but I can deal
with.
Have a look at the Additive property of logger/category, and set it to
false (BTW
I'm using tomcat 5.5.25
I modified the log4j in the commons dir:
common/classes/log4j.properties
and added two seporate logging definitions based on class:
log4j.rootLogger=INFO, R
log4j.category.com.tabs=REBUG, T
in my java code I define the logger as:
Logger log = Logger.getLogger("com.tabs.
Work for me. Different versions require different setups. 5.5 required
log4j.jar
and commons-logging.jar in common/lib. 6.x requries you to manually rebuild
their
custom logging framework to work with Log4j. By default, it's hard-wired to
JUL.
So, all that can be considered "fishy". I've n
log4j under Tomcat is known to be "fishy" regarding class path.
Are you sure this suggestion works?
On Mon, Jul 13, 2009 at 10:27 AM, Jacob Kjome wrote:
> You have to deploy log4j.jar in both common/lib as well as WEB-INF/lib of
> each
> app. Tomcat will use the one in common/lib and each webap
You have to deploy log4j.jar in both common/lib as well as WEB-INF/lib of each
app. Tomcat will use the one in common/lib and each webapp will use the one in
its respective WEB-INF/lib (because of child-first, or parent-last, classloading
behavior of webapps).
Jake
On 7/11/2009 6:01 PM, Lucas Vi
instead of differntiation based on root logger do it based on different
packages. This way you can easily have package A write to file A with INFO
and package B write to file B at DEBUG.
On Sun, Jul 12, 2009 at 3:01 AM, Lucas Vickers wrote:
> Hello,
> Excuse my simple question as I am new to tomc
Hello,
Excuse my simple question as I am new to tomcat/log4j.
I have looked at the mailing list and did some googling but no luck.
What I would like to do is have my tomcat installation use one log file, and
then my own servlet use a different log file.
./common/classes/log4j.properties =
log4j.
11 matches
Mail list logo