Want faster, flexible & more robust logging?
Have you looked at LogBack by the creator of Log4J yet???
Introducing the LogBack Addon for Roo
Features
- Adds the command to the Roo shell –
logback setup - Creates a New File: src/main/resources/logback.xml
- Changes to Maven POM:
- new <property> “logback.version”
- dependencies for logback-core, access, classic
- java util logging and jakarta commons logging bridges
- Removed dependency: slf4j-log4j
- Logging in Your Code:
- Import the SLF4J Logger classes
import org.slf4j.Logger;
import org.slf4j.LoggerFactory; - Declare the logger
public class MyClass {
Logger logger = LoggerFactory.getLogger(MyClass.class);…
- Write your log statements as desired
logger.debug("****** YOUR DEBUG MESSAGE ******");
- Import the SLF4J Logger classes
Source code in Git:
git clone git://github.com/gordonad/logback-roo-addon.git