fix(logging): add logging namespace and create logging::init method (#2336)

This commit is contained in:
ReenigneArcher
2024-04-02 20:57:57 -04:00
committed by GitHub
parent a1edc246f5
commit 2da6fb050a
9 changed files with 304 additions and 158 deletions

View File

@@ -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