Minor improvements to logging.

This commit is contained in:
Pedro Pinto committed 2017-08-18 15:30:48 +00:00
1 parent d4445fe3e3
commit 2ebf337805
3 files changed
+18 -11

No files matched your search

+12 -6
View File
@@ -71,15 +71,21 @@ void configure_logging(bts::config::Logging const&cfg)
real_cfg.subsystem_names = { {Gen,"Gen"},
{Cfg,"Cfg"},
{QBus,"QBus"},
{Log,"Log"} };
{Log,"Log"},
{Jetfix,"Jetfix"},
{MarketData,"MarketData"},
{Api,"Api"},
{Persistence,"Persistence"} };
real_cfg.sinks["console"] = std::make_pair (console_sink(),get_filter(real_cfg,cfg.console()));
real_cfg.sinks["syslog"] = std::make_pair (syslog_sink(),get_filter(real_cfg,cfg.syslog()));
real_cfg.sinks["console"] =
std::make_pair (console_sink(),get_filter(real_cfg,cfg.console()));
real_cfg.sinks["syslog"] =
std::make_pair (syslog_sink(),get_filter(real_cfg,cfg.syslog()));
configure_logging(real_cfg);
}
LoggingConfigPoller::LoggingConfigPoller (bts::config::Logging const&cfg) : _poller_thread(),
_done(false)
LoggingConfigPoller::LoggingConfigPoller (bts::config::Logging const&cfg)
: _poller_thread(), _done(false)
{
init(cfg);
}
@@ -104,7 +110,7 @@ void LoggingConfigPoller::init (bts::config::Logging const&cfg)
configure_logging(cfg);
_poller_thread = std::thread([this,log_cache_file] {
os::set_thread_name("log config poll");
os::set_thread_name("log_config_poller");
auto last_ts = std::time(nullptr);
while (!_done) {