Skip to content

Commit

Permalink
adding syslog_ident option (2) ...
Browse files Browse the repository at this point in the history
  • Loading branch information
scuzzilla committed Sep 28, 2022
1 parent 760430a commit f32a732
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ syslog = "true";
## default => syslog_facility = "LOG_USER" | supported [LOG_DAEMON, LOG_USER, LOG_LOCAL(0..7)]
syslog_facility = "LOG_LOCAL3";

## Syslog Ident:
## default => syslog_ident = "mdt-dialout-collector"
syslog_ident = "mdt-dout-collector-01";

## Console support:
## default => console_log = "true"
console_log = "false";
Expand Down
3 changes: 0 additions & 3 deletions src/utils/logs_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,6 @@ bool LogsHandler::set_spdlog_sinks()
this->multi_logger = std::make_shared<spdlog::logger>
("multi-logger", begin(spdlog_sinks), end(spdlog_sinks));
this->multi_logger->set_level(spdlog::level::from_str(spdlog_level));
this->multi_logger->set_pattern(
"[%d-%m-%Y %T.%e] [%n] [%^%l%$] ["
+ logs_cfg_parameters.at("syslog_ident") + "] %v");
spdlog::register_logger(this->multi_logger);

return true;
Expand Down

0 comments on commit f32a732

Please sign in to comment.