25#include <boost/program_options.hpp>
28#include <unordered_map>
31#include <seastar/util/log.hh>
32#include <seastar/util/program-options.hh>
34#include <seastar/core/sstring.hh>
51using log_level_map = std::unordered_map<sstring, log_level>;
108void parse_map_associations(
const std::string& v, std::function<
void(std::string, std::string)> consume_key_value);
116template <
class OutputIter>
118 std::for_each(levels.begin(), levels.end(), [&out](
auto&& pair) {
119 *out++ = std::make_pair(pair.first, parse_log_level(pair.second));
Definition: program-options.hh:293
Wrapper for command-line options with arbitrary string associations.
Definition: program-options.hh:74
log_level
log level used with
Definition: log.hh:55
log_level parse_log_level(const sstring &)
Parse a log-level ({error, warn, info, debug, trace}) string, throwing std::runtime_error for an inva...
logging_settings extract_settings(const boost::program_options::variables_map &)
Extract CLI options into a logging configuration.
boost::program_options::options_description get_options_description()
Options for controlling logging at run-time.
void print_available_loggers(std::ostream &os)
Print a human-friendly list of the available loggers.
Seastar API namespace.
Definition: abort_on_ebadf.hh:26
Logging configuration.
Definition: log-cli.hh:54
program_options::value< bool > log_to_stdout
Send log output to output stream.
Definition: log-cli.hh:76
program_options::value< seastar::logger_ostream_type > logger_ostream_type
Definition: log-cli.hh:81
program_options::value< log_level_map > logger_log_level
Map of logger name to log level.
Definition: log-cli.hh:66
program_options::value< bool > log_with_color
Definition: log-cli.hh:90
program_options::value< logger_timestamp_style > logger_stdout_timestamps
Definition: log-cli.hh:71
program_options::value< log_level > default_log_level
Default log level for log messages.
Definition: log-cli.hh:60
program_options::value< bool > log_to_syslog
Definition: log-cli.hh:85