|
From: Brad H. <Bra...@gb...> - 2006-11-28 05:50:23
|
Hi Richard,
Make sure you have the following jars on your classpath:
log4j 1.2.x (log4j)
slf4j-log4j12 1.x (binds slf4j to log4j)
jcl104-over-slf4j 1.x (replacement for commons logging that routes
through slf4j, can't remember if always required)
Use the SLF4JLogFactory when creating your SessionFactory.
Then the easiest way to configure is to put a log4j.properties file
somewhere on your classpath. I generally have the working directory on
the classpath and put the file in there, but you can also stick it in
the root of a jar.
This is a very minimalistic log4j.properties that will log INFO and
above to stdout.
log4j.rootLogger=3DINFO,console
log4j.appender.console=3Dorg.apache.log4j.ConsoleAppender
log4j.appender.console.layout=3Dorg.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=3D%d %-5p (%t) [%c{2}]
%m%n
If you've done all this and it appears to be logging using something
else like jdk logging, make sure you don't have any of the other slf4j
jars like slf4j-jdk14 1.x on your classpath - I suspect it'll pick up
whatever it finds first.
Regards,
Brad.
-----Original Message-----
From: qui...@li...
[mailto:qui...@li...] On Behalf Of
Richard Pike
Sent: Tuesday, 28 November 2006 3:11 AM
To: qui...@li...
Subject: [Quickfixj-users] Help on log4j configuration
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/
I am struggling to configure log4j with a config file, can someone help
by sending an example of how I would configure quickfix to use log4j,
Thanks..=20
|