See: Description
Class | Description |
---|---|
Logger |
This 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. |
LoggerFactory |
This class implements a thin wrapper around a subset of methods of
the
LoggerFactory 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. |
Implements a thin wrapper around a subset of classes and methods of SLFJ.
The primary classes of this package are LoggerFactory
and Logger
.
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: