Kea 1.5.0
output_option.h
Go to the documentation of this file.
1// Copyright (C) 2011-2015 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 <stdint.h>
11#include <stdlib.h>
12#include <string>
13
33
34namespace isc {
35namespace log {
36
38
41 typedef enum {
44 DEST_SYSLOG = 2
46
48 typedef enum {
50 STR_STDERR = 2
52
55 flush(true), facility("LOCAL0"), filename(""),
56 maxsize(0), maxver(0)
57 {}
58
60
63 bool flush;
64 std::string facility;
65 std::string filename;
66 size_t maxsize;
67 unsigned int maxver;
68};
69
70OutputOption::Destination getDestination(const std::string& dest_str);
71OutputOption::Stream getStream(const std::string& stream_str);
72
73
74} // namespace log
75} // namespace isc
76
77#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-dhcp-ddns.
Stream
If console, stream on which messages are output.
Definition: output_option.h:48
Destination destination
Members.
Definition: output_option.h:61
Destination
Destinations.
Definition: output_option.h:41
bool flush
true to flush after each message
Definition: output_option.h:63
size_t maxsize
0 if no maximum size
Definition: output_option.h:66
OutputOption()
Constructor.
Definition: output_option.h:54
unsigned int maxver
Maximum versions (none if <= 0)
Definition: output_option.h:67
std::string facility
syslog facility
Definition: output_option.h:64
Stream stream
stdout/stderr if console output
Definition: output_option.h:62
std::string filename
Filename if file output.
Definition: output_option.h:65