public class LoggingMux extends Object implements LoggingEndpoint
LoggingEndpoint
s and itself implements the
LoggingEndpoint
interface. It may be use to direct logging
messages to several endpoints simultaneously. For example, an application
may send messages to both a console and a file.LoggingEndpoint
Modifier and Type | Field and Description |
---|---|
private Vector |
v |
ERROR, INFO, STATUS, WARNING
Constructor and Description |
---|
LoggingMux()
Construct a new
LoggingMux . |
Modifier and Type | Method and Description |
---|---|
void |
addLoggingEndpoint(LoggingEndpoint endpoint)
Add a
LoggingEndpoint to the set. |
void |
close()
Close this set of endpoints.
|
void |
close(boolean closeEndpoints)
Close this set of endpoints.
|
void |
logMessage(int type,
String message)
Log a message to all endpoints in this set.
|
void |
removeAllLoggingEndpoints()
Remove all
LoggingEndpoint s from the set. |
void |
removeLoggingEndpoint(LoggingEndpoint endpoint)
Remove a
LoggingEndpoint from the set. |
public LoggingMux()
LoggingMux
.public void logMessage(int type, String message)
logMessage
in interface LoggingEndpoint
type
- The message type; one of the static constants defined above.message
- The message.public void close()
close(false)
.close
in interface LoggingEndpoint
public void close(boolean closeEndpoints)
closeEndpoints
- If true
, in addition to removing every
LoggingEndpoint
from its list, the LoggingMux
closes each LoggingEndpoint
explicitly via a call to its
close()
method.public void addLoggingEndpoint(LoggingEndpoint endpoint)
LoggingEndpoint
to the set.endpoint
- The LoggingEndpoint
to add.public void removeLoggingEndpoint(LoggingEndpoint endpoint)
LoggingEndpoint
from the set.endpoint
- The LoggingEndpoint
to remove.public void removeAllLoggingEndpoints()
LoggingEndpoint
s from the set.WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses