Files
labs-web-applications/src/common/logger.hpp
T

22 lines
632 B
C++
Raw Normal View History

#pragma once
#include <boost/log/core.hpp>
#include <boost/log/expressions.hpp>
#include <boost/log/trivial.hpp>
#include <boost/log/utility/setup/common_attributes.hpp>
#include <boost/log/utility/setup/console.hpp>
#include <boost/log/utility/setup/file.hpp>
class Logger
{
public:
static void
init(bool toConsole = true, const std::string_view filePath = "");
static void info(const std::string_view msg);
static void warn(const std::string_view msg);
static void error(const std::string_view msg);
static void debug(const std::string_view msg);
static void fatal(const std::string_view msg);
};