37 lines
642 B
C++
37 lines
642 B
C++
#pragma once
|
|
|
|
#include "Common.h"
|
|
#include "Sink.h"
|
|
#include "LoggingConfig.h"
|
|
|
|
#include <string>
|
|
|
|
namespace bts {
|
|
namespace log {
|
|
|
|
class Logger;
|
|
struct LogRec;
|
|
|
|
class LoggerHub {
|
|
public:
|
|
LoggerHub(std::string const& );
|
|
~LoggerHub();
|
|
void config(const LoggingConfig &cfg);
|
|
void start();
|
|
Logger &make_logger();
|
|
|
|
private:
|
|
struct SinkRec;
|
|
struct PImpl;
|
|
std::unique_ptr<PImpl> me;
|
|
|
|
void do_work();
|
|
void update_logger_queue_limits();
|
|
size_t consume_log_recs();
|
|
void rebuild_logger_filters();
|
|
void dispatch_to_sinks(size_t tid,std::string const&thread_name,LogRec&);
|
|
Filter get_base_filter() const;
|
|
};
|
|
|
|
}}
|