CatapultServer  v0.5.0.1 (Elephant)
LoggingConfiguration.h
Go to the documentation of this file.
1 
21 #pragma once
23 #include "catapult/utils/Logging.h"
24 #include <string>
25 #include <unordered_map>
26 
27 namespace catapult { namespace utils { class ConfigurationBag; } }
28 
29 namespace catapult { namespace config {
30 
35 
38 
40  std::unordered_map<std::string, utils::LogLevel> ComponentLevels;
41  };
42 
47  };
48 
52  std::string Directory;
53 
55  std::string FilePattern;
56 
59 
62 
65  };
66 
69  public:
72 
75 
76  private:
77  LoggingConfiguration() = default;
78 
79  public:
82 
83  public:
86  };
87 
90 
93 }}
ColorMode
static constexpr auto ColorMode
Definition: Logging.cpp:90
catapult::config::BasicLoggerConfiguration::Level
utils::LogLevel Level
Log level.
Definition: LoggingConfiguration.h:37
catapult::utils::VerifyBagSizeLte
void VerifyBagSizeLte(const ConfigurationBag &bag, size_t expectedSize)
Verifies that the number of properties in bag is no greater than expectedSize.
Definition: utils/ConfigurationUtils.cpp:38
catapult::utils::FileSize::bytes
constexpr uint64_t bytes() const
Returns the number of bytes.
Definition: FileSize.h:67
catapult::config::GetConsoleLoggerOptions
utils::BasicLoggerOptions GetConsoleLoggerOptions(const ConsoleLoggerConfiguration &config)
Maps console logger configuration (config) to console logger options.
Definition: LoggingConfiguration.cpp:64
catapult::config::LoggingConfiguration::File
FileLoggerConfiguration File
File logger settings.
Definition: LoggingConfiguration.h:74
catapult::config::BasicLoggerConfiguration
Basic logger configuration settings.
Definition: LoggingConfiguration.h:32
catapult::utils::LogColorMode
LogColorMode
Catapult (console) log color modes.
Definition: Logging.h:80
FileSize.h
catapult::config::FileLoggerConfiguration::MinFreeSpace
utils::FileSize MinFreeSpace
Minimum size of free disk space in order to create log files.
Definition: LoggingConfiguration.h:64
catapult::utils::FileLoggerOptions::MinFreeSpace
uint64_t MinFreeSpace
Minimum size of free disk space in order to create log files.
Definition: Logging.h:158
catapult::utils::ConfigurationBag
A simple bag of properties.
Definition: ConfigurationBag.h:57
catapult::utils::BasicLoggerOptions
Basic logger options.
Definition: Logging.h:122
catapult::config::LoggingConfiguration
Logging configuration settings.
Definition: LoggingConfiguration.h:68
catapult::config::FileLoggerConfiguration::RotationSize
utils::FileSize RotationSize
File rotation size.
Definition: LoggingConfiguration.h:58
catapult::utils::LogSinkType
LogSinkType
Catapult log sink types.
Definition: Logging.h:67
catapult::config::LoggingConfiguration::Uninitialized
static LoggingConfiguration Uninitialized()
Creates an uninitialized logging configuration.
Definition: LoggingConfiguration.cpp:27
catapult::config::LoggingConfiguration::LoggingConfiguration
LoggingConfiguration()=default
LOAD_FILE_LOGGER_PROPERTY
#define LOAD_FILE_LOGGER_PROPERTY(NAME)
catapult::config::ConsoleLoggerConfiguration::ColorMode
utils::LogColorMode ColorMode
Console color mode.
Definition: LoggingConfiguration.h:46
catapult::utils::LogLevel
LogLevel
Catapult log levels.
Definition: Logging.h:36
catapult::utils::FileSize
Represents a file size.
Definition: FileSize.h:29
catapult::config::LoggingConfiguration::LoadFromBag
static LoggingConfiguration LoadFromBag(const utils::ConfigurationBag &bag)
Loads a logging configuration from bag.
Definition: LoggingConfiguration.cpp:31
catapult::utils::FileLoggerOptions
File logger options.
Definition: Logging.h:138
catapult::utils::BasicLoggerOptions::ColorMode
LogColorMode ColorMode
Log color mode.
Definition: Logging.h:134
catapult::config::BasicLoggerConfiguration::SinkType
utils::LogSinkType SinkType
Log sink type.
Definition: LoggingConfiguration.h:34
ConfigurationUtils.h
catapult::config::FileLoggerConfiguration::Directory
std::string Directory
Log file directory.
Definition: LoggingConfiguration.h:52
catapult::config::BasicLoggerConfiguration::ComponentLevels
std::unordered_map< std::string, utils::LogLevel > ComponentLevels
Custom component log levels.
Definition: LoggingConfiguration.h:40
ConfigurationBag.h
catapult::config::ConsoleLoggerConfiguration
Console logger configuration settings.
Definition: LoggingConfiguration.h:44
LOAD_CONSOLE_LOGGER_PROPERTY
#define LOAD_CONSOLE_LOGGER_PROPERTY(NAME)
catapult::config::FileLoggerConfiguration::FilePattern
std::string FilePattern
Log file pattern.
Definition: LoggingConfiguration.h:55
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::config::GetFileLoggerOptions
utils::FileLoggerOptions GetFileLoggerOptions(const FileLoggerConfiguration &config)
Maps file logger configuration (config) to file logger options.
Definition: LoggingConfiguration.cpp:71
LoggingConfiguration.h
Logging.h
catapult::config::FileLoggerConfiguration
File logger configuration settings.
Definition: LoggingConfiguration.h:50
catapult::config::LoggingConfiguration::Console
ConsoleLoggerConfiguration Console
Console logger settings.
Definition: LoggingConfiguration.h:71
catapult::utils::BasicLoggerOptions::SinkType
LogSinkType SinkType
Log sink type.
Definition: Logging.h:131
catapult::config::FileLoggerConfiguration::MaxTotalSize
utils::FileSize MaxTotalSize
Maximum size of all log files.
Definition: LoggingConfiguration.h:61
catapult::utils::ConfigurationBag::getAll
UnorderedKeyValueMap< T > getAll(const char *section) const
Gets all section properties from this bag.
Definition: ConfigurationBag.h:142
catapult::utils::FileLoggerOptions::RotationSize
uint64_t RotationSize
File rotation size.
Definition: Logging.h:152
catapult::utils::FileLoggerOptions::MaxTotalSize
uint64_t MaxTotalSize
Maximum size of all log files.
Definition: Logging.h:155