Package | Description |
---|---|
org.apache.logging.log4j.core |
Implementation of Log4j 2.
|
org.apache.logging.log4j.core.appender |
Log4j 2 Appenders.
|
org.apache.logging.log4j.core.appender.db |
The classes in this package and sub packages provide appenders for various types of databases and methods for
accessing databases.
|
org.apache.logging.log4j.core.appender.mom |
Message oriented middleware appenders.
|
org.apache.logging.log4j.core.appender.rolling |
Rolling File Appender and support classes.
|
org.apache.logging.log4j.core.layout |
Log4j 2 Layout support.
|
org.apache.logging.log4j.core.net |
Log4j 2 network support.
|
Modifier and Type | Method and Description |
---|---|
Layout<? extends Serializable> |
Appender.getLayout()
Returns the Layout used by this Appender if applicable.
|
Modifier and Type | Field and Description |
---|---|
protected Layout<?> |
OutputStreamManager.layout |
Modifier and Type | Method and Description |
---|---|
Layout<? extends Serializable> |
AbstractAppender.getLayout()
Returns the Layout for the appender.
|
Modifier and Type | Method and Description |
---|---|
static ConsoleAppender |
ConsoleAppender.createAppender(Layout<? extends Serializable> layout,
Filter filter,
String targetStr,
String name,
String follow,
String ignore)
Create a Console Appender.
|
static SocketAppender |
SocketAppender.createAppender(String host,
String portNum,
String protocolStr,
SslConfiguration sslConfig,
int connectTimeoutMillis,
String delayMillis,
String immediateFail,
String name,
String immediateFlush,
String ignore,
Layout<? extends Serializable> layout,
Filter filter,
String advertise,
Configuration config) |
static RandomAccessFileAppender |
RandomAccessFileAppender.createAppender(String fileName,
String append,
String name,
String immediateFlush,
String bufferSizeStr,
String ignore,
Layout<? extends Serializable> layout,
Filter filter,
String advertise,
String advertiseURI,
Configuration config)
Create a File Appender.
|
static MemoryMappedFileAppender |
MemoryMappedFileAppender.createAppender(String fileName,
String append,
String name,
String immediateFlush,
String regionLengthStr,
String ignore,
Layout<? extends Serializable> layout,
Filter filter,
String advertise,
String advertiseURI,
Configuration config)
Create a Memory Mapped File Appender.
|
static FileAppender |
FileAppender.createAppender(String fileName,
String append,
String locking,
String name,
String immediateFlush,
String ignore,
String bufferedIo,
String bufferSizeStr,
Layout<? extends Serializable> layout,
Filter filter,
String advertise,
String advertiseUri,
Configuration config)
Create a File Appender.
|
static SmtpAppender |
SmtpAppender.createAppender(String name,
String to,
String cc,
String bcc,
String from,
String replyTo,
String subject,
String smtpProtocol,
String smtpHost,
String smtpPortStr,
String smtpUsername,
String smtpPassword,
String smtpDebug,
String bufferSizeStr,
Layout<? extends Serializable> layout,
Filter filter,
String ignore)
Deprecated.
|
static RollingFileAppender |
RollingFileAppender.createAppender(String fileName,
String filePattern,
String append,
String name,
String bufferedIO,
String bufferSizeStr,
String immediateFlush,
TriggeringPolicy policy,
RolloverStrategy strategy,
Layout<? extends Serializable> layout,
Filter filter,
String ignore,
String advertise,
String advertiseURI,
Configuration config)
Create a RollingFileAppender.
|
static RollingRandomAccessFileAppender |
RollingRandomAccessFileAppender.createAppender(String fileName,
String filePattern,
String append,
String name,
String immediateFlush,
String bufferSizeStr,
TriggeringPolicy policy,
RolloverStrategy strategy,
Layout<? extends Serializable> layout,
Filter filter,
String ignore,
String advertise,
String advertiseURI,
Configuration config)
Create a RollingRandomAccessFileAppender.
|
static ConsoleAppender |
ConsoleAppender.createDefaultAppenderForLayout(Layout<? extends Serializable> layout) |
protected static AbstractSocketManager |
SocketAppender.createSocketManager(String name,
Protocol protocol,
String host,
int port,
int connectTimeoutMillis,
SslConfiguration sslConfig,
int delayMillis,
boolean immediateFail,
Layout<? extends Serializable> layout)
Creates an AbstractSocketManager for TCP, UDP, and SSL.
|
static FileManager |
FileManager.getFileManager(String fileName,
boolean append,
boolean locking,
boolean bufferedIo,
String advertiseUri,
Layout<? extends Serializable> layout,
int bufferSize)
Returns the FileManager.
|
static RandomAccessFileManager |
RandomAccessFileManager.getFileManager(String fileName,
boolean append,
boolean isFlush,
int bufferSize,
String advertiseURI,
Layout<? extends Serializable> layout)
Returns the RandomAccessFileManager.
|
static MemoryMappedFileManager |
MemoryMappedFileManager.getFileManager(String fileName,
boolean append,
boolean isForce,
int regionLength,
String advertiseURI,
Layout<? extends Serializable> layout)
Returns the MemoryMappedFileManager.
|
ConsoleAppender.Builder |
ConsoleAppender.Builder.setLayout(Layout<? extends Serializable> layout) |
SmtpAppender.Builder |
SmtpAppender.Builder.setLayout(Layout<? extends Serializable> layout)
Overrides the default layout.
|
Constructor and Description |
---|
AbstractAppender(String name,
Filter filter,
Layout<? extends Serializable> layout)
Constructor that defaults to suppressing exceptions.
|
AbstractAppender(String name,
Filter filter,
Layout<? extends Serializable> layout,
boolean ignoreExceptions)
Constructor.
|
AbstractOutputStreamAppender(String name,
Layout<? extends Serializable> layout,
Filter filter,
boolean ignoreExceptions,
boolean immediateFlush,
M manager)
Instantiate a WriterAppender and set the output destination to a
new
OutputStreamWriter initialized with os
as its OutputStream . |
FileManager(String fileName,
OutputStream os,
boolean append,
boolean locking,
String advertiseURI,
Layout<? extends Serializable> layout,
int bufferSize) |
MemoryMappedFileManager(RandomAccessFile file,
String fileName,
OutputStream os,
boolean force,
long position,
int regionLength,
String advertiseURI,
Layout<? extends Serializable> layout) |
OutputStreamManager(OutputStream os,
String streamName,
Layout<?> layout) |
RandomAccessFileManager(RandomAccessFile file,
String fileName,
OutputStream os,
boolean immediateFlush,
int bufferSize,
String advertiseURI,
Layout<? extends Serializable> layout) |
SocketAppender(String name,
Layout<? extends Serializable> layout,
Filter filter,
AbstractSocketManager manager,
boolean ignoreExceptions,
boolean immediateFlush,
Advertiser advertiser) |
SyslogAppender(String name,
Layout<? extends Serializable> layout,
Filter filter,
boolean ignoreExceptions,
boolean immediateFlush,
AbstractSocketManager manager,
Advertiser advertiser) |
Modifier and Type | Method and Description |
---|---|
Layout<LogEvent> |
AbstractDatabaseAppender.getLayout()
This always returns
null , as database appenders do not use a single layout. |
Modifier and Type | Method and Description |
---|---|
JmsAppender.Builder |
JmsAppender.Builder.setLayout(Layout<? extends Serializable> layout) |
Constructor and Description |
---|
JmsAppender(String name,
Filter filter,
Layout<? extends Serializable> layout,
boolean ignoreExceptions,
JmsManager manager) |
Modifier and Type | Method and Description |
---|---|
static RollingFileManager |
RollingFileManager.getFileManager(String fileName,
String pattern,
boolean append,
boolean bufferedIO,
TriggeringPolicy policy,
RolloverStrategy strategy,
String advertiseURI,
Layout<? extends Serializable> layout,
int bufferSize)
Returns a RollingFileManager.
|
static RollingRandomAccessFileManager |
RollingRandomAccessFileManager.getRollingRandomAccessFileManager(String fileName,
String filePattern,
boolean isAppend,
boolean immediateFlush,
int bufferSize,
TriggeringPolicy policy,
RolloverStrategy strategy,
String advertiseURI,
Layout<? extends Serializable> layout) |
Constructor and Description |
---|
RollingFileManager(String fileName,
String pattern,
OutputStream os,
boolean append,
long size,
long time,
TriggeringPolicy triggeringPolicy,
RolloverStrategy rolloverStrategy,
String advertiseURI,
Layout<? extends Serializable> layout,
int bufferSize) |
RollingRandomAccessFileManager(RandomAccessFile raf,
String fileName,
String pattern,
OutputStream os,
boolean append,
boolean immediateFlush,
int bufferSize,
long size,
long time,
TriggeringPolicy policy,
RolloverStrategy strategy,
String advertiseURI,
Layout<? extends Serializable> layout) |
Modifier and Type | Class and Description |
---|---|
class |
AbstractLayout<T extends Serializable>
Abstract base class for Layouts.
|
class |
AbstractStringLayout
Abstract base class for Layouts that result in a String.
|
class |
GelfLayout
Lays out events in the Graylog Extended Log Format (GELF) 1.1.
|
class |
HtmlLayout
Outputs events as rows in an HTML table on an HTML page.
|
class |
JsonLayout
Appends a series of JSON events as strings serialized as bytes.
|
class |
PatternLayout
A flexible layout configurable with pattern string.
|
class |
Rfc5424Layout
Formats a log event in accordance with RFC 5424.
|
class |
SerializedLayout
Formats a
LogEvent in its Java serialized form. |
class |
SyslogLayout
Formats a log event as a BSD Log record.
|
class |
XmlLayout
Appends a series of
event elements as defined in the log4j.dtd. |
Modifier and Type | Method and Description |
---|---|
protected byte[] |
SmtpManager.formatContentToBytes(LogEvent[] priorEvents,
LogEvent appendEvent,
Layout<?> layout) |
static SslSocketManager |
SslSocketManager.getSocketManager(SslConfiguration sslConfig,
String host,
int port,
int connectTimeoutMillis,
int delayMillis,
boolean immediateFail,
Layout<? extends Serializable> layout) |
static TcpSocketManager |
TcpSocketManager.getSocketManager(String host,
int port,
int connectTimeoutMillis,
int delayMillis,
boolean immediateFail,
Layout<? extends Serializable> layout)
Obtain a TcpSocketManager.
|
static DatagramSocketManager |
DatagramSocketManager.getSocketManager(String host,
int port,
Layout<? extends Serializable> layout)
Obtain a SocketManager.
|
void |
SmtpManager.sendEvents(Layout<?> layout,
LogEvent appendEvent)
Send the contents of the cyclic buffer as an e-mail message.
|
protected void |
SmtpManager.writeBuffer(LogEvent[] priorEvents,
LogEvent appendEvent,
Layout<?> layout,
OutputStream out) |
protected void |
SmtpManager.writeFooter(Layout<?> layout,
OutputStream out) |
protected void |
SmtpManager.writeHeader(Layout<?> layout,
OutputStream out) |
Constructor and Description |
---|
AbstractSocketManager(String name,
OutputStream os,
InetAddress inetAddress,
String host,
int port,
Layout<? extends Serializable> layout)
The Constructor.
|
DatagramSocketManager(String name,
OutputStream os,
InetAddress inetAddress,
String host,
int port,
Layout<? extends Serializable> layout)
The Constructor.
|
SslSocketManager(String name,
OutputStream os,
Socket sock,
SslConfiguration sslConfig,
InetAddress inetAddress,
String host,
int port,
int connectTimeoutMillis,
int delay,
boolean immediateFail,
Layout<? extends Serializable> layout) |
TcpSocketManager(String name,
OutputStream os,
Socket sock,
InetAddress inetAddress,
String host,
int port,
int connectTimeoutMillis,
int delay,
boolean immediateFail,
Layout<? extends Serializable> layout)
The Constructor.
|
Copyright © 1999-2021 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.