Kea 2.7.4
isc::log::OutputOption Struct Reference

#include <output_option.h>

Public Types

enum  Destination { DEST_CONSOLE = 0 , DEST_FILE = 1 , DEST_SYSLOG = 2 }
 Destinations. More...
 
enum  Stream { STR_STDOUT = 1 , STR_STDERR = 2 }
 If console, stream on which messages are output. More...
 

Public Member Functions

 OutputOption ()
 Constructor.
 

Public Attributes

Destination destination
 Members.
 
std::string facility
 syslog facility
 
std::string filename
 Filename if file output.
 
bool flush
 true to flush after each message
 
uint64_t maxsize
 0 if no maximum size
 
unsigned int maxver
 Maximum versions (none if <= 0)
 
std::string pattern
 log content pattern
 
Stream stream
 stdout/stderr if console output
 

Static Public Attributes

static const std::string DEFAULT_CONSOLE_PATTERN = "%D{%Y-%m-%d %H:%M:%S.%q} %-5p [%c/%i.%t] %m\n"
 Default layout pattern for console logs.
 
static const std::string DEFAULT_FILE_PATTERN = "%D{%Y-%m-%d %H:%M:%S.%q} %-5p [%c/%i.%t] %m\n"
 Default layout pattern for file logs.
 
static const std::string DEFAULT_SYSLOG_PATTERN = "%-5p [%c.%t] %m\n"
 Default layout pattern for syslog logs.
 

Detailed Description

Definition at line 37 of file output_option.h.

Member Enumeration Documentation

◆ Destination

Destinations.

Prefixed "DEST_" to avoid problems with the C stdio.h FILE type.

Enumerator
DEST_CONSOLE 
DEST_FILE 
DEST_SYSLOG 

Definition at line 48 of file output_option.h.

◆ Stream

If console, stream on which messages are output.

Enumerator
STR_STDOUT 
STR_STDERR 

Definition at line 55 of file output_option.h.

Constructor & Destructor Documentation

◆ OutputOption()

isc::log::OutputOption::OutputOption ( )
inline

Constructor.

Definition at line 61 of file output_option.h.

Member Data Documentation

◆ DEFAULT_CONSOLE_PATTERN

const std::string isc::log::OutputOption::DEFAULT_CONSOLE_PATTERN = "%D{%Y-%m-%d %H:%M:%S.%q} %-5p [%c/%i.%t] %m\n"
static

Default layout pattern for console logs.

Definition at line 40 of file output_option.h.

◆ DEFAULT_FILE_PATTERN

const std::string isc::log::OutputOption::DEFAULT_FILE_PATTERN = "%D{%Y-%m-%d %H:%M:%S.%q} %-5p [%c/%i.%t] %m\n"
static

Default layout pattern for file logs.

Definition at line 42 of file output_option.h.

◆ DEFAULT_SYSLOG_PATTERN

const std::string isc::log::OutputOption::DEFAULT_SYSLOG_PATTERN = "%-5p [%c.%t] %m\n"
static

Default layout pattern for syslog logs.

Definition at line 44 of file output_option.h.

◆ destination

Destination isc::log::OutputOption::destination

Members.

Where the output should go

Definition at line 68 of file output_option.h.

Referenced by isc::dhcp::test::LogContentTest::LogContentTest(), isc::log::setDefaultLoggingOutput(), and isc::process::LoggingInfo::toSpec().

◆ facility

std::string isc::log::OutputOption::facility

syslog facility

Definition at line 71 of file output_option.h.

◆ filename

std::string isc::log::OutputOption::filename

Filename if file output.

Definition at line 72 of file output_option.h.

◆ flush

bool isc::log::OutputOption::flush

true to flush after each message

Definition at line 70 of file output_option.h.

◆ maxsize

uint64_t isc::log::OutputOption::maxsize

0 if no maximum size

Definition at line 73 of file output_option.h.

◆ maxver

unsigned int isc::log::OutputOption::maxver

Maximum versions (none if <= 0)

Definition at line 74 of file output_option.h.

◆ pattern

std::string isc::log::OutputOption::pattern

log content pattern

Definition at line 75 of file output_option.h.

◆ stream

Stream isc::log::OutputOption::stream

stdout/stderr if console output

Definition at line 69 of file output_option.h.


The documentation for this struct was generated from the following files: