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 
34 namespace isc {
35 namespace log {
36 
37 struct OutputOption {
38 
41  typedef enum {
43  DEST_FILE = 1,
45  } Destination;
46 
48  typedef enum {
51  } Stream;
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 
70 OutputOption::Destination getDestination(const std::string& dest_str);
71 OutputOption::Stream getStream(const std::string& stream_str);
72 
73 
74 } // namespace log
75 } // namespace isc
76 
77 #endif // OUTPUT_OPTION_H
size_t maxsize
0 if no maximum size
Definition: output_option.h:66
OutputOption::Stream getStream(const std::string &stream_str)
bool flush
true to flush after each message
Definition: output_option.h:63
Stream stream
stdout/stderr if console output
Definition: output_option.h:62
std::string facility
syslog facility
Definition: output_option.h:64
Destination
Destinations.
Definition: output_option.h:41
Destination destination
Members.
Definition: output_option.h:61
Defines the logger used by the top-level component of kea-dhcp-ddns.
OutputOption::Destination getDestination(const std::string &dest_str)
unsigned int maxver
Maximum versions (none if <= 0)
Definition: output_option.h:67
OutputOption()
Constructor.
Definition: output_option.h:54
Stream
If console, stream on which messages are output.
Definition: output_option.h:48
std::string filename
Filename if file output.
Definition: output_option.h:65