public class ConsoleLogSink extends Object implements LogSink
Modifier and Type | Class and Description |
---|---|
static class |
ConsoleLogSink.Heaplet
Creates and initializes a console sink in a heap environment.
|
LOGSINK_HEAP_KEY
Constructor and Description |
---|
ConsoleLogSink() |
Modifier and Type | Method and Description |
---|---|
boolean |
isLoggable(Name source,
LogLevel level)
Returns
true if the entry may be logged based on its source and/or level. |
void |
log(LogEntry entry)
Logs an entry.
|
void |
setLevel(LogLevel level)
Sets the level of log entries to display in the console.
|
void |
setStream(org.forgerock.openig.log.ConsoleLogSink.Stream stream)
Sets the stream to write entries to.
|
public ConsoleLogSink()
public void setLevel(LogLevel level)
level
- level of log entries to display in the consolepublic void setStream(org.forgerock.openig.log.ConsoleLogSink.Stream stream)
stream
- the stream to write entries to.public boolean isLoggable(Name source, LogLevel level)
LogSink
true
if the entry may be logged based on its source and/or level. This
does not guarantee that the entry will in fact be logged.isLoggable
in interface LogSink
source
- the object and/or event related to the log entry.level
- the logging level of the log entry.true
if the entry may be logged.Copyright © 2014 ForgeRock AS. All rights reserved.