public interface TraceMessageAcceptor
An instance of this interface is given to the TraceController
via
its setAcceptor()
method. If a message
acceptor is not provided in this way, the TraceController
class will
provide a standard default implementation, which simply writes messages to a
log file. Typically that default implementation is the one you want to use.
This interface exists for circumstances which require trace messages to
receive special handling (for example, to make the message appear in an
application server's log file using a vendor-proprietary logging API).
Modifier and Type | Method and Description |
---|---|
void |
accept(TraceMessage message)
Accept a message and do whatever is appropriate to make it visible to a
user, either now or later.
|
boolean |
setConfiguration(String name,
String value)
Modify the acceptor configuration based on a property setting.
|
void |
setupIsComplete()
After this call, the TraceMessageAcceptor must obey settings
from the environment.
|
void accept(TraceMessage message)
Note that this method will be called after the message passes a priority threshold check. TraceMessageAcceptors don't know about priorities.
The TraceMessageAcceptor is allowed to unilaterally discard the message. Generally, this is done only if it was turned off by a control external to this interface.
message
- The trace message to be handled.boolean setConfiguration(String name, String value)
name
- Property name.value
- Property value.void setupIsComplete()
It is an error to call this method more than once.
Copyright © 2017. All rights reserved.