public class CLRBufferedLogHandler extends Handler
Logs are buffered to avoid the cost of reef-bridge function calls. A thread is also scheduled to flush the log buffer at a certain interval, in case the log buffer remains unfilled for an extended period of time.
Constructor and Description |
---|
CLRBufferedLogHandler() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Flushes the remaining buffered logs and shuts down the log scheduler thread.
|
void |
flush() |
void |
publish(LogRecord record)
Called whenever a log message is received on the java side.
|
void |
setDriverInitialized()
Signals the java-bridge has been initialized and that we can begin logging.
|
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, setEncoding, setErrorManager, setFilter, setFormatter, setLevel
@Inject public CLRBufferedLogHandler()
public void setDriverInitialized()
public void publish(LogRecord record)
Adds the log record to the log buffer. If the log buffer is full and the driver has already been initialized, flush the buffer of the logs.
public void close() throws SecurityException
close
in class Handler
SecurityException
Copyright © 2017 The Apache Software Foundation. All rights reserved.