This is a simple file logging facility for Java BlackBerry development.
It’s very raw and not optimal, it MUST NOT BE USED EXCEPT FOR DEVELOPMENT PURPOSES!
Logger.LOG_ENABLED is set to true by default, so Logger is enabled by default. To disable Logger just set Logger.LOG_ENABLED to false.
By default Logger will use “file:///SDCard/application.log” file. You may change it with modifying the Logger.LOG_FILE and/or Logger.LOG_FILE_NAME constants. For instance, in some cases you might want to use DeviceMemory instead of SDCard. For this just set LOG_FILE to “file:///store/home/user/” + LOG_FILE_NAME.
Within the application code you may do logging as follows:
Logger.debug("This is a log entry!");
or to see a full class name of the object firing the log entry:
Logger.debug(this, "This is a log entry and I see whom it was fired by!");
To try an example (demo application) please launch LoggerApplication (com.cleverua.bb.example) in BlackBerry device simulator.