public class Slf4jStream extends Object
Loggers.| Modifier and Type | Method and Description |
|---|---|
Slf4jOutputStream |
as(Level level) |
Slf4jOutputStream |
asDebug() |
Slf4jOutputStream |
asError() |
Slf4jOutputStream |
asInfo() |
Slf4jOutputStream |
asTrace() |
Slf4jOutputStream |
asWarn() |
static Slf4jStream |
of(Class<?> klass) |
static Slf4jStream |
of(Class<?> klass,
String name)
Constructs a logger from a class name and an additional name,
appended to the end.
|
static Slf4jStream |
of(org.slf4j.Logger log) |
static Slf4jStream |
of(String name) |
static Slf4jStream |
ofCaller() |
public static Slf4jStream of(org.slf4j.Logger log)
log - logger which an output stream redirects to.public static Slf4jStream of(Class<?> klass)
klass - class which is used to get the logger's name.public static Slf4jStream of(Class<?> klass, String name)
klass.getName() + "." + nameklass - class which is used to get the logger's name.name - logger's name, appended to the class name.public static Slf4jStream of(String name)
name - logger's name (full or short).
In case of short name (no dots) the given name is prefixed by caller's class name and a dot.public static Slf4jStream ofCaller()
public Slf4jOutputStream as(Level level)
level - the desired logging levelpublic Slf4jOutputStream asTrace()
trace level.public Slf4jOutputStream asDebug()
debug level.public Slf4jOutputStream asInfo()
info level.public Slf4jOutputStream asWarn()
warn level.public Slf4jOutputStream asError()
error level.Copyright © 2020 ZeroTurnaround. All rights reserved.