Kea 3.3.3
output_option.h
Go to the documentation of this file.
1// Copyright (C) 2011-2026 Internet Systems Consortium, Inc. ("ISC")
2//
3// This Source Code Form is subject to the terms of the Mozilla Public
4// License, v. 2.0. If a copy of the MPL was not distributed with this
5// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7#ifndef OUTPUT_OPTION_H
8#define OUTPUT_OPTION_H
9
10#include <cstdint>
11#include <string>
12
32
33namespace isc {
34namespace log {
35
37
39 static const std::string DEFAULT_CONSOLE_PATTERN;
41 static const std::string DEFAULT_FILE_PATTERN;
43 static const std::string DEFAULT_SYSLOG_PATTERN;
44
47 enum Destination : uint16_t {
51 };
52
54 enum Stream : uint16_t {
57 };
58
61 flush(true), facility("LOCAL0"), filename(""),
62 maxsize(0), maxver(0), pattern("")
63 {}
64
66
69 bool flush;
70 std::string facility;
71 std::string filename;
72 uint64_t maxsize;
73 unsigned int maxver;
74 std::string pattern;
75};
76
77OutputOption::Destination getDestination(const std::string& dest_str);
78OutputOption::Stream getStream(const std::string& stream_str);
79
80
81} // namespace log
82} // namespace isc
83
84#endif // OUTPUT_OPTION_H
OutputOption::Destination getDestination(const std::string &dest_str)
OutputOption::Stream getStream(const std::string &stream_str)
Defines the logger used by the top-level component of kea-lfc.
Destination destination
Members.
std::string pattern
log content pattern
Stream
If console, stream on which messages are output.
bool flush
true to flush after each message
static const std::string DEFAULT_FILE_PATTERN
Default layout pattern for file logs.
OutputOption()
Constructor.
unsigned int maxver
Maximum versions (none if <= 0).
std::string facility
syslog facility
uint64_t maxsize
0 if no maximum size
Stream stream
stdout/stderr if console output
static const std::string DEFAULT_SYSLOG_PATTERN
Default layout pattern for syslog logs.
std::string filename
Filename if file output.
static const std::string DEFAULT_CONSOLE_PATTERN
Default layout pattern for console logs.