public class LogTransformer extends Object implements FunctionTransformer, Lookup, org.apache.commons.collections.Predicate
Transformer
, Lookup
flows and Chain
s
Logger.isDebugEnabled()
then log will happen @ debug level or @ info level. Throwable objects go into Error level
log
ger is assigned then it will use the default class Logger
Constructor and Description |
---|
LogTransformer() |
LogTransformer(org.slf4j.Logger log) |
Modifier and Type | Method and Description |
---|---|
boolean |
evaluate(Object input) |
org.slf4j.Logger |
getLog() |
String |
getLogStringTemplate()
A Template that allows using String.format, use %s to denote actual log substitution
|
void |
init() |
void |
setLog(org.slf4j.Logger log) |
void |
setLogStringTemplate(String logStringTemplate)
A Template that allows using String.format, use %s to denote actual log substitution
|
Object |
transform(Object input)
For a Given String, Lookup a value for it
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
apply
public LogTransformer()
public LogTransformer(org.slf4j.Logger log)
@PostConstruct public void init()
public Object transform(Object input)
Lookup
public org.slf4j.Logger getLog()
public void setLog(org.slf4j.Logger log)
public String getLogStringTemplate()
public void setLogStringTemplate(String logStringTemplate)
public boolean evaluate(Object input)
evaluate
in interface org.apache.commons.collections.Predicate
Copyright © 2018. All rights reserved.