Joutsen Logging v0.5.0+22-gec3d058
Public Member Functions | Properties | List of all members
Joutsen.Logging.FileRotationHandler Class Reference

A log handler class that rotates betweeen files that it writes to. More...

Public Member Functions

 FileRotationHandler (FileRotationOptions options, Formatter formatter)
 Creates a new instance. More...
 
 FileRotationHandler (FileRotationOptions options, Formatter formatter, Filesystem filesystem)
 Creates a new instance. More...
 
void Log (LogRecord record)
 Writes a log entry using the format provided by the Joutsen.Logging.StreamHandler.Formatter. More...
 
virtual void Dispose ()
 Writes the remaining values to the file before it is closed. More...
 
void Log (LogRecord record)
 

Properties

Filter Filter [get, set]
 An optional filter which determines if the record is handled by this handler. More...
 
Formatter Formatter [get, set]
 The formatter to be used to create the log entries which are written. More...
 
global::System.Text.Encoding Encoding [get, set]
 The encoding to use when writing to the file. More...
 
- Properties inherited from Joutsen.Logging.Handler
Filter Filter [get, set]
 An optional filter which determines if the record is handled by this handler. More...
 
Formatter Formatter [get, set]
 he formatter to be used to create the log entries which are written. More...
 
Encoding Encoding [get, set]
 The encoding of the output. More...
 

Detailed Description

A log handler class that rotates betweeen files that it writes to.

Since
0.4.0

Constructor & Destructor Documentation

◆ FileRotationHandler() [1/2]

Joutsen.Logging.FileRotationHandler.FileRotationHandler ( FileRotationOptions  options,
Formatter  formatter 
)

Creates a new instance.

Parameters
optionsthe file and rotation configuration for the handler
formatterthe formatter to format the log entries before writing them to the file

◆ FileRotationHandler() [2/2]

Joutsen.Logging.FileRotationHandler.FileRotationHandler ( FileRotationOptions  options,
Formatter  formatter,
Filesystem  filesystem 
)

Creates a new instance.

Parameters
optionsthe file and rotation configuration for the handler
formatterthe formatter to format the log entries before writing them to the file
filesystemaccess to the underlying file system

Member Function Documentation

◆ Dispose()

virtual void Joutsen.Logging.FileRotationHandler.Dispose ( )
virtual

Writes the remaining values to the file before it is closed.

◆ Log()

void Joutsen.Logging.FileRotationHandler.Log ( LogRecord  record)

Writes a log entry using the format provided by the Joutsen.Logging.StreamHandler.Formatter.

Parameters
recordthe record to write

Implements Joutsen.Logging.Handler.

Property Documentation

◆ Encoding

global.System.Text.Encoding Joutsen.Logging.FileRotationHandler.Encoding
getset

The encoding to use when writing to the file.

Implements Joutsen.Logging.Handler.

◆ Filter

Filter Joutsen.Logging.FileRotationHandler.Filter
getset

An optional filter which determines if the record is handled by this handler.

Implements Joutsen.Logging.Handler.

◆ Formatter

Formatter Joutsen.Logging.FileRotationHandler.Formatter
getset

The formatter to be used to create the log entries which are written.

Implements Joutsen.Logging.Handler.