slf4d.writer

This module defines the SerializingLogHandler, LogWriter interface, and associated components for writing serialized log messages to external systems.

Members

Classes

DefaultStringLogSerializer
class DefaultStringLogSerializer

A log serializer that formats messages in the same way that SLF4D's default provider does, which is <module> <level> <timestamp> <message>, roughly.

JsonLogSerializer
class JsonLogSerializer

A log serializer that formats messages in a JSON string, containing all data in the original log message struct.

RotatingFileLogWriter
class RotatingFileLogWriter

A log writer that writes log messages to files in a directory, switching to a new file when the current one reaches a set size (defaults to 2GB).

SerializingLogHandler
class SerializingLogHandler

A log handler that serializes incoming messages, and uses a LogWriter to write them to some output resource, like a standard output stream, file, or network device. Most SLF4D providers will probably end up using some sort of serializing handler at the end of the day.

SingleFileLogWriter
class SingleFileLogWriter

A log writer that always writes to the same file.

StdoutLogWriter
class StdoutLogWriter

Writes logs to the standard output stream.

Interfaces

LogSerializer
interface LogSerializer

A component that serializes a log message into a string representation. Note that a serializer may be called from many threads at once; you should ensure it is thread-safe, or synchronize as needed.

LogWriter
interface LogWriter

A log writer is a component that writes a serialized log message string to some output resource, like a file or network device. Note that because this write method may be called from many threads, it should be thread-safe, or appropriately synchronized.