winss
log_settings.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2016-2017 Morgan Stanley
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef LIB_WINSS_LOG_LOG_SETTINGS_HPP_
18 #define LIB_WINSS_LOG_LOG_SETTINGS_HPP_
19 
20 #include <filesystem>
21 
22 namespace fs = std::experimental::filesystem;
23 
24 namespace winss {
28 struct LogSettings {
29  unsigned int number = 10;
30  unsigned int file_size = 99999;
31  bool timestamp = false;
32  fs::path log_dir = ".";
33 };
34 } // namespace winss
35 
36 #endif // LIB_WINSS_LOG_LOG_SETTINGS_HPP_
Definition: case_ignore.hpp:23
Settings for the logger.
Definition: log_settings.hpp:28
fs::path log_dir
The log directory.
Definition: log_settings.hpp:32
unsigned int file_size
The max file size in bytes.
Definition: log_settings.hpp:30
unsigned int number
The number of archives to keep.
Definition: log_settings.hpp:29
bool timestamp
Prepend a ISO 8601 timestamp.
Definition: log_settings.hpp:31