23 debug_log_to_stderr_(false),
24 debug_log_stderr_threshold_(kDebugLogInfo),
25 debug_log_min_threshold_(kDebugLogInfo),
26 verbose_log_level_(0),
28 debug_log_dir_(
"/tmp/") {
43 "For ease of debugging, some of the options here has corresponding APIs to change\n"
44 " at runtime. So, those options are merely initial configurations.\n"
45 " enum DebugLogLevel: Defines debug logging levels\n"
46 " kDebugLogInfo = 0: Usual logs\n"
47 " kDebugLogWarning = 1: Warns that there are something unexpected, but not a big issue.\n"
48 " kDebugLogError = 2: Raises a major issue.\n"
49 " kDebugLogFatal = 3: Immediately quits the engine after this log."));
52 "Whether to write debug logs to stderr rather than log file.\n"
53 " Default is false. There is an API to change this setting at runtime.");
55 "Debug logs at or above this level will be copied to stderr.\n"
56 " Default is kDebugLogInfo. There is an API to change this setting at runtime.");
58 "Debug logs below this level will be completely ignored.\n"
59 " Default is kDebugLogInfo. There is an API to change this setting at runtime.");
61 "Verbose debug logs (VLOG(m)) at or less than this number will be shown.\n"
62 " Default is 0. There is an API to change this setting at runtime.");
64 "Per-module verbose level."
65 " The value has to contain a comma-separated list of\n"
66 " 'module name'='log level'. 'module name' is a glob pattern\n"
67 " (e.g., gfs* for all modules whose name starts with 'gfs'),\n"
68 " matched against the filename base (that is, name ignoring .cc/.h./-inl.h)\n"
69 " Default is '/'. There is an API to change this setting at runtime.");
71 "Path of the folder to write debug logs.\n"
72 " Default is '/tmp'. @attention We do NOT have API to change this setting at runtime.\n"
73 " You must configure this as a start-up option.");
#define EXTERNALIZE_LOAD_ELEMENT(element, attribute)
Reads a child xml element to load a member variable of this object.
bool debug_log_to_stderr_
Whether to write debug logs to stderr rather than log file.
Root package of FOEDUS (Fast Optimistic Engine for Data Unification Services).
DebuggingOptions()
Constructs option values with default values.
assorted::FixedString< 252 > verbose_modules_
Per-module verbose level.
Brings error stacktrace information as return value of functions.
static ErrorStack insert_comment(tinyxml2::XMLElement *element, const std::string &comment)
#define EXTERNALIZE_SAVE_ENUM_ELEMENT(element, attribute, comment)
Adds an xml element to represent a member variable of this object.
ErrorStack save(tinyxml2::XMLElement *element) const override
Writes the content of this object to the given XML element.
#define EXTERNALIZE_LOAD_ENUM_ELEMENT(element, attribute)
Reads a child xml element to load a member variable of this object.
ErrorStack load(tinyxml2::XMLElement *element) override
Reads the content of this object from the given XML element.
fs::FixedPath debug_log_dir_
Path of the folder to write debug logs.
#define CHECK_ERROR(x)
This macro calls x and checks its returned value.
DebugLogLevel debug_log_min_threshold_
Debug logs below this level will be completely ignored.
const ErrorStack kRetOk
Normal return value for no-error case.
#define EXTERNALIZE_SAVE_ELEMENT(element, attribute, comment)
Adds an xml element to represent a member variable of this object.
DebugLogLevel debug_log_stderr_threshold_
Debug logs at or above this level will be copied to stderr.
int16_t verbose_log_level_
Verbose debug logs (VLOG(m)) at or less than this number will be shown.