This is the quickstart guide for the impatient programmer. It assumes that you already have downloaded and extracted the zip delivery, since you are reading this document. Lets get going!
Right click on the project in the "Package Explorer". Select "Build Path -> Add External Archives". You get prompted to select a zip/jar file. In this case you should select the microlog-2.0.0-SNAPSHOT-me.jar file.
This looks like this:
private final static Logger log = LoggerFactory.getLogger();
private final static Logger log = LoggerFactory.getLogger(MyMidletClass.class);
This looks like this
public void SuperMIDlet(){
Appender appender = new ConsoleAppender();
log.addAppender(appender);
}
The log level is set by default to DEBUG and the default formatter is the SimpleFormatter.
log.debug("MicroLog is working!");
You should probably see your logged message.
MicroLog has support for configuring using properties.
The properties are fetched from the following sources in the specified order:
To configure using properties, just add the following to our source code:
MidletPropertyConfigurator.configure();
This configures Microlog using the default settings. It searches through
Happy logging!