public class EagerHandler extends ProxyHandler
Handler
that formats its message immediately and forwards it to a delegate. This is useful if
mutable objects are used as log record parameters, and the delegate handler formats messages with a delay
(like MemoryHandler
.
This may cause noticable costs if the objects' ObjectObject.toString()
methods are expensive and/or return large
strings.
Constructor and Description |
---|
EagerHandler() |
EagerHandler(String propertyNamePrefix) |
Modifier and Type | Method and Description |
---|---|
void |
publish(LogRecord record) |
close, flush, getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, setDelegate, setEncoding, setErrorManager, setFilter, setFormatter, setLevel
reportError
public EagerHandler() throws ParseException, EvaluationException
ParseException
EvaluationException
public EagerHandler(@Nullable String propertyNamePrefix) throws ParseException, EvaluationException
ParseException
EvaluationException
public void publish(@Nullable LogRecord record)
publish
in class ProxyHandler
Copyright © 2018 Arno Unkrig. All rights reserved.