The upcoming milestone will have some changes in the logging
framework. This is likely to affect existing codes (most certainly if
they are using Log4J).
The key points:
- We have migrated to the new SLF4J 1.6 series (1.6.1 to be precise)
- SLF4J 1.6 and above does not have mandatory requirement for a
logging backend pre-configured. If it doesn't find one, it just
shows a warning and defaults to a NOP logger implementation (as
against failing to boot up as it used to be earlier).
- We have taken the opportunity to remove hard dependency on Log4J and
treat all SLF4J bindings as equals. This simplifies logging
configuration in different environment and additionally helps in
better integration with other logging addons.
- This means an application intending to use binding other than Log4J
doesn't have to go through the complication of excluding Log4J and
including a different binding in the build configuration. Just
including the preferred binding would suffice.
- This also means that applications using Log4J have to explicitly
configure the SLF4J binding (which wasn't necessary earlier because
of hard dependency on Log4J inside Lift). This is a BREAKING CHANGE
for existing applications. See config snippet below.
- If you intend to use logback-classic, you need to add:
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>0.9.26</version>
</dependency>
- If you intend to use Log4J, you need to add:
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.6.1</version>
</dependency>
- The archetype templates have been updated accordingly. So new
projects would automatically get the revised configuration. The
default for new projects is logback-classic. However, if you wish to
use Log4J instead you can either:
- modify the build config appropriately (remove logback-classic
dependency and add log4j dependency)
- use the CLI param logBackend during archetype:generate like so:
mvn archetype:generate -DlogBackend=log4j ... ...
- Indrajit
--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.