lintel 0.2.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
lintel::LoggerSinkConfiguration Class Reference

#include <LoggerSinkConfiguration.h>

Public Types

enum  LoggerSinkType {
  ConsoleSink , TcpSink , DailyFileSink , RotatingFileSink ,
  SysLogSink
}
 

Public Member Functions

 LoggerSinkConfiguration (LoggerSinkType type, std::string level, std::string pattern)
 
 LoggerSinkConfiguration (LoggerSinkType type, std::string level, std::string pattern, std::string fileName, std::string time)
 
 LoggerSinkConfiguration (LoggerSinkType type, std::string level, std::string pattern, std::string fileName, std::size_t fileSize, std::size_t maxFiles)
 
 LoggerSinkConfiguration (LoggerSinkType type, std::string level, std::string pattern, std::string connection, int32_t port)
 
 LoggerSinkConfiguration (LoggerSinkType type, std::string level, std::string pattern, std::string id)
 
LoggerSinkType getType () const
 
const std::string & getLevel () const
 
const std::string & getPattern () const
 
const std::string & getFileName () const
 
const std::string & getTime () const
 
size_t getFileSize () const
 
const std::string & getConnection () const
 
int32_t getPort () const
 
const std::string & getId () const
 
size_t getMaxFiles () const
 

Detailed Description

Configuration for a single logger sink (output destination)

Member Enumeration Documentation

◆ LoggerSinkType

Supported logger sink types

Enumerator
ConsoleSink 

Console output

TcpSink 

TCP network output

DailyFileSink 

Daily rotating file

RotatingFileSink 

Size-based rotating file

SysLogSink 

System log output

Constructor & Destructor Documentation

◆ LoggerSinkConfiguration() [1/5]

lintel::LoggerSinkConfiguration::LoggerSinkConfiguration ( LoggerSinkType  type,
std::string  level,
std::string  pattern 
)

Construct a console sink configuration

Parameters
typeThe sink type
levelThe log level
patternThe log pattern

◆ LoggerSinkConfiguration() [2/5]

lintel::LoggerSinkConfiguration::LoggerSinkConfiguration ( LoggerSinkType  type,
std::string  level,
std::string  pattern,
std::string  fileName,
std::string  time 
)

Construct a daily file sink configuration

Parameters
typeThe sink type
levelThe log level
patternThe log pattern
fileNameThe base file name
timeThe rotation time

◆ LoggerSinkConfiguration() [3/5]

lintel::LoggerSinkConfiguration::LoggerSinkConfiguration ( LoggerSinkType  type,
std::string  level,
std::string  pattern,
std::string  fileName,
std::size_t  fileSize,
std::size_t  maxFiles 
)

Construct a rotating file sink configuration

Parameters
typeThe sink type
levelThe log level
patternThe log pattern
fileNameThe base file name
fileSizeThe maximum file size
maxFilesThe maximum number of files

◆ LoggerSinkConfiguration() [4/5]

lintel::LoggerSinkConfiguration::LoggerSinkConfiguration ( LoggerSinkType  type,
std::string  level,
std::string  pattern,
std::string  connection,
int32_t  port 
)

Construct a TCP sink configuration

Parameters
typeThe sink type
levelThe log level
patternThe log pattern
connectionThe connection string
portThe port number

◆ LoggerSinkConfiguration() [5/5]

lintel::LoggerSinkConfiguration::LoggerSinkConfiguration ( LoggerSinkType  type,
std::string  level,
std::string  pattern,
std::string  id 
)

Construct a syslog sink configuration

Parameters
typeThe sink type
levelThe log level
patternThe log pattern
idThe syslog identifier

Member Function Documentation

◆ getConnection()

const std::string & lintel::LoggerSinkConfiguration::getConnection ( ) const

Get the TCP connection string

Returns
The connection string

◆ getFileName()

const std::string & lintel::LoggerSinkConfiguration::getFileName ( ) const

Get the file name

Returns
The file name

◆ getFileSize()

size_t lintel::LoggerSinkConfiguration::getFileSize ( ) const

Get the maximum file size

Returns
The file size in bytes

◆ getId()

const std::string & lintel::LoggerSinkConfiguration::getId ( ) const

Get the syslog identifier

Returns
The identifier string

◆ getLevel()

const std::string & lintel::LoggerSinkConfiguration::getLevel ( ) const

Get the log level

Returns
The level string

◆ getMaxFiles()

size_t lintel::LoggerSinkConfiguration::getMaxFiles ( ) const

Get the maximum number of rotated files

Returns
The maximum files count

◆ getPattern()

const std::string & lintel::LoggerSinkConfiguration::getPattern ( ) const

Get the log pattern

Returns
The pattern string

◆ getPort()

int32_t lintel::LoggerSinkConfiguration::getPort ( ) const

Get the TCP port

Returns
The port number

◆ getTime()

const std::string & lintel::LoggerSinkConfiguration::getTime ( ) const

Get the rotation time

Returns
The time string

◆ getType()

LoggerSinkType lintel::LoggerSinkConfiguration::getType ( ) const

Get the sink type

Returns
The sink type

The documentation for this class was generated from the following file: