Maverick Legacy APIs (1.6.x) Internal Logging

The Maverick Legacy APIs include an internal logging mechanism, if you choose to install it.

To install, drop the maverick-slf4j.jar from the opt/other folder of the distribution into your classpath. Ensure that you also have the slf4j-api-1.7.2.jar file but no other slf4j files.

By default the logger will output to System.err. The following system properties allow you to configure the logger output.

 Add them using standard System Property arguments to the JVM e.g. -Dcom.maverick.simpleLogger.logFile=maverick.log or alternatively add a "" file to your resource path.

com.maverick.simpleLogger.logFile - The output target which can be the path to a file, or the special values "System.out" and "System.err". Default is "System.err".

com.maverick.simpleLogger.defaultLogLevel - Default log level for all instances of SimpleLogger. Must be one of ("trace", "debug", "info", "warn", or "error"). If not specified, defaults to "info".

com.maverick.simpleLogger.log.a.b.c - Logging detail level for a SimpleLogger instance named "a.b.c". Right-side value must be one of "trace", "debug", "info", "warn", or "error". When a SimpleLogger named "a.b.c" is initialized, its level is assigned from this property. If unspecified, the level of nearest parent logger will be used, and if none is set, then the value specified by org.slf4j.simpleLogger.defaultLogLevel will be used.

com.maverick.simpleLogger.showDateTime - Set to true if you want the current date and time to be included in output messages. Default is true.

com.maverick.simpleLogger.dateTimeFormat - The date and time format to be used in the output messages. The pattern describing the date and time format is defined by SimpleDateFormat. If the format is not specified or is invalid, the number of milliseconds since start up will be output.

com.maverick.simpleLogger.showThreadName -Set to true if you want to output the current thread name. Defaults to true.

com.maverick.simpleLogger.showLogName - Set to true if you want the Logger instance name to be included in output messages. Defaults to true.

com.maverick.simpleLogger.showShortLogName - Set to true if you want the last component of the name to be included in output messages. Defaults to false.

com.maverick.simpleLogger.levelInBrackets - Should the level string be output in brackets? Defaults to false.

com.maverick.simpleLogger.warnLevelString - The string value output for the warn level. Defaults to WARN.

Have more questions? Submit a request


Please sign in to leave a comment.