You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by RB45F <rl...@gmail.com> on 2011/03/10 07:26:37 UTC

log4j config broken after upgrade from 2.1.1 to 2.2.4

I just upgraded from jackrabbit 2.1.1 to 2.2.4 and everything works properly
except the log4j configuration.

All I want to do is send jackrabbit log messages to a dedicated log file. I
use log4j.xml to create an appender (name="error") linked to a local file,
and also redirect info messages in the root logger here. I store the
log4j.xml in the root of the src folder in Eclipse - this technique used to
work for both a web application and desktop swing app, but neither work
properly now. 

Now I suspect the log4j.xml is not being referenced at all. I am seeing INFO
messages and a ton of DEBUG messages written to the console which didn't
happen before. Since I didn't have to deal with debug messages before their
presence now is also a new development.

Has anything changed between these 2 releases that may account for this? I
have searched this forum and elsewhere but have come up empty. 

Alternatively is there a better way to setup what I want? I want to stay as
close as possible to jackrabbit's default / preferred approach.

Thanks in advance for any help.

--
View this message in context: http://jackrabbit.510166.n4.nabble.com/log4j-config-broken-after-upgrade-from-2-1-1-to-2-2-4-tp3345260p3345260.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Re: log4j config broken after upgrade from 2.1.1 to 2.2.4

Posted by Jukka Zitting <jz...@adobe.com>.
Hi,

On 03/10/2011 07:26 AM, RB45F wrote:
> I just upgraded from jackrabbit 2.1.1 to 2.2.4 and everything works properly
> except the log4j configuration.

See the Jackrabbit 2.2.0 release notes:

   * Switch from log4j to Logback. The default Jackrabbit deployment
     packages (jar, war, rar) now use Logback instead of log4j for
     improved logging functionality. Thanks to the SLF4J logging
     framework it is still easy for downstream deployments to switch
     to another logging backend for example if support for existing
     configurations is needed.

You can switch back from logback to log4j simply by replacing the 
logback-core and logback-classic jars with slf4j-log4j and log4j.

-- 
Jukka Zitting