generated from Sithas/conan_template
25 lines
592 B
C++
25 lines
592 B
C++
#pragma once
|
|
|
|
#include <boost/log/trivial.hpp>
|
|
#include <boost/log/utility/setup/file.hpp>
|
|
#include <boost/log/utility/setup/common_attributes.hpp>
|
|
|
|
namespace logging = boost::log;
|
|
|
|
namespace uad
|
|
{
|
|
void InitLogs()
|
|
{
|
|
logging::add_file_log(
|
|
logging::keywords::file_name = "app_%Y-%m-%d_%H-%M-%S.log",
|
|
logging::keywords::rotation_size = 10 * 1024 * 1024,
|
|
logging::keywords::time_based_rotation =
|
|
logging::sinks::file::rotation_at_time_point(0, 0, 0),
|
|
logging::keywords::format =
|
|
"[%TimeStamp%] [%Severity%]: %Message%"
|
|
);
|
|
|
|
logging::add_common_attributes();
|
|
}
|
|
}
|