You can of course use slf4j instead of log4j in your application.
Quick steps:
1. Exclude log4j from dependency tree by adding exclusion filter in
lift-webkit dependency. POM should look something like this:
<dependency>
<groupId>net.liftweb</groupId>
<artifactId>lift-webkit</artifactId>
<version>1.1-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
</exclusions>
<dependency>
2. Add slf4j, logback dependencies in POM
3. Enable slf4j in Boot:
Slf4jLogBoot.enable()
4. Configure slf4j to use Slf4jLogBoot
Cheers, Indrajit
NB: net.liftweb.util.Slf4jLogBoot has a nice scaladoc with the above
steps. You might wish to go through that as well :-)
On 02/10/09 1:50 PM, Christopher Mason wrote:
>
> Is log4j a hard dependency to break? It seems like you're using slf4j
> most places, but then have some hard deps for configuration. I'm
> using logback. How hard would it be for me to remove the log4j dep
> and replace with slf4j/logback. (I have logback already configured in
> my servlet container.)
>
> Thanks!
>
> -c
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Lift" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---