Package com.pixelmed.slf4j
package com.pixelmed.slf4j
Implements a thin wrapper around a subset of classes and methods of SLFJ.
The primary classes of this package are LoggerFactory
and Logger
.
Package Specification
Typical usage is as follows:
import com.pixelmed.slf4j.Logger; import com.pixelmed.slf4j.LoggerFactory; public class MyClass { private static final Logger slf4jlogger = LoggerFactory.getLogger(MyClass.class); public static void main(String arg[]) { try { if (arg.length > 0) { slf4jlogger.error("Too many arguments - expected 0 got {}",arg.length); } } catch (Exception e) { slf4jlogger.info("Not really expecting this",e); } } }
Properties that affect the behavior of the log output even when no SLF4J implementation is provided are as follows:
- org.slf4j.simpleLogger.defaultLogLevel (default logging detail level for all instances, default is info)
- org.slf4j.simpleLogger.log.xxxxx (logging detail level for a logger instance named "xxxxx")
- org.slf4j.simpleLogger.showDateTime (default is false)
- org.slf4j.simpleLogger.dateTimeFormat (default is ms since start)
Related Documentation
For overviews, tutorials, examples, guides, and tool documentation, please see:-
ClassesClassDescriptionThis class implements a thin wrapper around a subset of methods of the
Logger
class from the SLF4J facade, in order to allow those methods commonly used by the toolkit to be usable without invoking a runtime dependency on the SLF4J jar files.This class implements a thin wrapper around a subset of methods of theLoggerFactory
class from the SLF4J facade, in order to allow those methods commonly used by the toolkit to be usable without invoking a runtime dependency on the SLF4J jar files.