|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.javasimon.callback.logging.LogTemplates
public class LogTemplates
Factory of LogTemplates.
Produces various implementations
| Constructor Summary | |
|---|---|
LogTemplates()
|
|
| Method Summary | ||
|---|---|---|
static
|
disabled()
Produces a disabled log template wich never log anything |
|
static
|
everyNMilliseconds(LogTemplate<C> delegateLogger,
long period)
Produces a log template which logs something at most every N milliseconds |
|
static
|
everyNSeconds(LogTemplate<C> delegateLogger,
long period)
Produces a log template which logs something at most every N secoonds |
|
static
|
everyNSplits(LogTemplate<C> delegateLogger,
int period)
Produces a log template which logs something every N split |
|
static
|
toJUL(String loggerName,
Level level)
Produces a concrete log template which logs messages into a Java Util Logging Logger. |
|
static
|
toSLF4J(String loggerName,
String levelName)
Produces a concrete log template which logs messages into a SLF4J Logger. |
|
static
|
toSLF4J(String loggerName,
String levelName,
String markerName)
Produces a concrete log template which logs messages into a SLF4J Logger. |
|
static SplitThresholdLogTemplate |
whenSplitLongerThanMilliseconds(LogTemplate<Split> delegateLogger,
long threshold)
Produces a log template which logs something when stopwatch split is longer than threshold. |
|
static SplitThresholdLogTemplate |
whenSplitLongerThanNanoseconds(LogTemplate<Split> delegateLogger,
long threshold)
Produces a log template which logs something when stopwatch split is longer than threshold. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LogTemplates()
| Method Detail |
|---|
public static <C> DisabledLogTemplate<C> disabled()
public static <C> CounterLogTemplate<C> everyNSplits(LogTemplate<C> delegateLogger,
int period)
delegateLogger - Concrete log templateperiod - N value, period
public static <C> PeriodicLogTemplate<C> everyNMilliseconds(LogTemplate<C> delegateLogger,
long period)
delegateLogger - Concrete log templateperiod - N value in milliseconds, maximum period
public static <C> PeriodicLogTemplate<C> everyNSeconds(LogTemplate<C> delegateLogger,
long period)
delegateLogger - Concrete log templateperiod - N value in seconds, maximum period
public static <C> SLF4JLogTemplate<C> toSLF4J(String loggerName,
String levelName,
String markerName)
loggerName - Logger namelevelName - Level name (info, debug, warn, etc.)markerName - Marker name
public static <C> SLF4JLogTemplate<C> toSLF4J(String loggerName,
String levelName)
loggerName - Logger namelevelName - Level name (info, debug, warn, etc.)
public static <C> JULLogTemplate<C> toJUL(String loggerName,
Level level)
loggerName - Logger namelevel - Level (warn, fine, finer, etc.)
public static SplitThresholdLogTemplate whenSplitLongerThanNanoseconds(LogTemplate<Split> delegateLogger,
long threshold)
delegateLogger - Concrete log templatethreshold - Threshold (in nanoseconds), above which logging is enabled
public static SplitThresholdLogTemplate whenSplitLongerThanMilliseconds(LogTemplate<Split> delegateLogger,
long threshold)
delegateLogger - Concrete log templatethreshold - Threshold (in milliseconds), above which logging is enabled
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||