forked from respu/proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlog.h
More file actions
27 lines (22 loc) · 1.06 KB
/
log.h
File metadata and controls
27 lines (22 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
//
// Copyright (c) Marco Amorim 2015.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
#pragma once
#include <string>
#include <boost/log/trivial.hpp>
#include <boost/log/sources/severity_channel_logger.hpp>
#include <boost/log/sources/channel_logger.hpp>
#include <boost/log/attributes.hpp>
#define LOG_TRACE() BOOST_LOG_SEV(logger_, boost::log::trivial::trace)
#define LOG_DEBUG() BOOST_LOG_SEV(logger_, boost::log::trivial::debug)
#define LOG_INFO() BOOST_LOG_SEV(logger_, boost::log::trivial::info)
#define LOG_WARNING() BOOST_LOG_SEV(logger_, boost::log::trivial::warning)
#define LOG_ERROR() BOOST_LOG_SEV(logger_, boost::log::trivial::error)
#define LOG_FATAL() BOOST_LOG_SEV(logger_, boost::log::trivial::fatal)
void init_log_system(
const std::string& settings_file,
const std::string& severity_level);
typedef boost::log::sources::severity_channel_logger_mt< boost::log::trivial::severity_level, std::string > logger_type;