You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
1.1 KiB
22 lines
1.1 KiB
#ifndef JUCI_LOGGING_H_ |
|
#define JUCI_LOGGING_H_ |
|
|
|
#include <boost/log/core.hpp> |
|
#include <boost/log/trivial.hpp> |
|
#include <boost/log/expressions.hpp> |
|
#include <boost/log/sinks/text_file_backend.hpp> |
|
#include <boost/log/utility/setup/file.hpp> |
|
#include <boost/log/utility/setup/common_attributes.hpp> |
|
#include <boost/log/sources/severity_logger.hpp> |
|
#include <boost/log/sources/record_ostream.hpp> |
|
|
|
using namespace boost::log; |
|
|
|
#define TRACE(x) BOOST_LOG_TRIVIAL(trace) << __func__ << "(" << __LINE__ << "): " << #x << "=<" << x << ">"; |
|
#define DEBUG(x) BOOST_LOG_TRIVIAL(debug) << __func__ << "(" << __LINE__ << "): " << #x << "=<" << x << ">"; |
|
#define INFO(x) BOOST_LOG_TRIVIAL(info) << __func__ << "(" << __LINE__ << "): \"" x << "\""; |
|
#define WARNING(x) BOOST_LOG_TRIVIAL(warning) << __func__ << "(" << __LINE__ << "): " << #x << "=<" << x << ">"; |
|
#define ERROR(x) BOOST_LOG_TRIVIAL(error) << __func__ << "(" << __LINE__ << "): " << #x << "=<" << x << ">"; |
|
#define FATAL(x) BOOST_LOG_TRIVIAL(fatal) << __func__ << "(" << __LINE__ << "): " << #x << "=<" << x << ">"; |
|
|
|
#endif // JUCI_LOGGING_H_
|
|
|