fix(logging): add logging namespace and create logging::init method (#2336)
This commit is contained in:
@@ -10,7 +10,6 @@
|
||||
#include <boost/log/common.hpp>
|
||||
#include <boost/log/sinks.hpp>
|
||||
|
||||
extern boost::shared_ptr<boost::log::sinks::asynchronous_sink<boost::log::sinks::text_ostream_backend>> sink;
|
||||
using text_sink = boost::log::sinks::asynchronous_sink<boost::log::sinks::text_ostream_backend>;
|
||||
|
||||
extern boost::log::sources::severity_logger<int> verbose;
|
||||
@@ -20,8 +19,20 @@ extern boost::log::sources::severity_logger<int> warning;
|
||||
extern boost::log::sources::severity_logger<int> error;
|
||||
extern boost::log::sources::severity_logger<int> fatal;
|
||||
|
||||
// functions
|
||||
void
|
||||
log_flush();
|
||||
void
|
||||
print_help(const char *name);
|
||||
namespace logging {
|
||||
class deinit_t {
|
||||
public:
|
||||
~deinit_t();
|
||||
};
|
||||
|
||||
void
|
||||
deinit();
|
||||
[[nodiscard]] std::unique_ptr<deinit_t>
|
||||
init(int min_log_level, const std::string &log_file);
|
||||
void
|
||||
setup_av_logging(int min_log_level);
|
||||
void
|
||||
log_flush();
|
||||
void
|
||||
print_help(const char *name);
|
||||
} // namespace logging
|
||||
|
||||
Reference in New Issue
Block a user