public class DefaultAccessLogReceiver extends Object implements AccessLogReceiver, Runnable, Closeable
Web threads do not touch the log file, but simply queue messages to be written later by a worker thread. A lightweight CAS based locking mechanism is used to ensure than only 1 thread is active writing messages at any given time
Modifier and Type | Class and Description |
---|---|
static class |
DefaultAccessLogReceiver.Builder |
Constructor and Description |
---|
DefaultAccessLogReceiver(Executor logWriteExecutor,
File outputDirectory,
String logBaseName) |
DefaultAccessLogReceiver(Executor logWriteExecutor,
File outputDirectory,
String logBaseName,
String logNameSuffix) |
DefaultAccessLogReceiver(Executor logWriteExecutor,
File outputDirectory,
String logBaseName,
String logNameSuffix,
boolean rotate) |
DefaultAccessLogReceiver(Executor logWriteExecutor,
Path outputDirectory,
String logBaseName) |
DefaultAccessLogReceiver(Executor logWriteExecutor,
Path outputDirectory,
String logBaseName,
String logNameSuffix) |
DefaultAccessLogReceiver(Executor logWriteExecutor,
Path outputDirectory,
String logBaseName,
String logNameSuffix,
boolean rotate) |
Modifier and Type | Method and Description |
---|---|
static DefaultAccessLogReceiver.Builder |
builder() |
void |
close() |
void |
logMessage(String message) |
void |
rotate()
forces a log rotation.
|
void |
run()
processes all queued log messages
|
public DefaultAccessLogReceiver(Executor logWriteExecutor, File outputDirectory, String logBaseName)
public DefaultAccessLogReceiver(Executor logWriteExecutor, File outputDirectory, String logBaseName, String logNameSuffix)
public DefaultAccessLogReceiver(Executor logWriteExecutor, File outputDirectory, String logBaseName, String logNameSuffix, boolean rotate)
public DefaultAccessLogReceiver(Executor logWriteExecutor, Path outputDirectory, String logBaseName)
public DefaultAccessLogReceiver(Executor logWriteExecutor, Path outputDirectory, String logBaseName, String logNameSuffix)
public void logMessage(String message)
logMessage
in interface AccessLogReceiver
public void rotate()
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public static DefaultAccessLogReceiver.Builder builder()
Copyright © 2020 JBoss by Red Hat. All rights reserved.