Defines helpful console logging methods.
More...
#include <boost/format.hpp>
#include <stdint.h>
#include <iostream>
#include <iomanip>
#include <boost/exception/diagnostic_information.hpp>
#include <mace/cmt/log/console_defines.h>
#include <boost/thread/mutex.hpp>
Go to the source code of this file.
Namespaces |
namespace | mace::cmt |
| All types that are part of the MACE Cooperative Multi-Tasking Library.
|
Defines |
#define | __func__ __FUNCTION__ |
#define | COLOR_CONSOLE 1 |
#define | dlog(...) |
#define | slog(...) |
#define | elog(...) |
#define | wlog(...) |
Functions |
const char * | mace::cmt::thread_name () |
Detailed Description
Definition in file log.hpp.
Define Documentation
Value:do {try { mace::cmt::detail::log( std::cerr, CONSOLE_DEFAULT, __FILE__, __LINE__, __func__, __VA_ARGS__ ); } \
catch (boost::exception&e){ mace::cmt::detail::log( std::cerr, CONSOLE_RED, __FILE__, __LINE__, __func__, "Invalid logs: %1%", boost::diagnostic_information(e) ); } \
catch (std::exception&e){ mace::cmt::detail::log( std::cerr, CONSOLE_RED, __FILE__, __LINE__, __func__, "Invalid logs: %1%", boost::diagnostic_information(e) ); } \
catch (...) {mace::cmt::detail::log( std::cerr, CONSOLE_RED, __FILE__, __LINE__, __func__, "Invalid logs - exception while formating args" ); } \
}while(false)
Definition at line 71 of file log.hpp.
Value:do {try {mace::cmt::detail::log( std::cerr, CONSOLE_RED, __FILE__, __LINE__, __func__, __VA_ARGS__ ); }\
catch (boost::exception&e){ mace::cmt::detail::log( std::cerr, CONSOLE_RED, __FILE__, __LINE__, __func__, "Invalid logs: %1%", boost::diagnostic_information(e) ); } \
catch (std::exception&e){ mace::cmt::detail::log( std::cerr, CONSOLE_RED, __FILE__, __LINE__, __func__, "Invalid logs: %1%", boost::diagnostic_information(e) ); } \
catch (...) {mace::cmt::detail::log( std::cerr, CONSOLE_RED, __FILE__, __LINE__, __func__, "Invalid logs - exception while formating args" ); } \
}while(false)
Definition at line 89 of file log.hpp.
Value:do {try {mace::cmt::detail::log( std::cerr, CONSOLE_DEFAULT, __FILE__, __LINE__, __func__, __VA_ARGS__ ); }\
catch (boost::exception&e){ mace::cmt::detail::log( std::cerr, CONSOLE_RED, __FILE__, __LINE__, __func__, "Invalid logs: %1%", boost::diagnostic_information(e) ); } \
catch (std::exception&e){ mace::cmt::detail::log( std::cerr, CONSOLE_RED, __FILE__, __LINE__, __func__, "Invalid logs: %1%", boost::diagnostic_information(e) ); } \
catch (...) {mace::cmt::detail::log( std::cerr, CONSOLE_RED, __FILE__, __LINE__, __func__, "Invalid logs - exception while formating args" ); } \
}while(false)
Definition at line 80 of file log.hpp.
Value:do {try {mace::cmt::detail::log( std::cerr, CONSOLE_BROWN, __FILE__, __LINE__, __func__, __VA_ARGS__ ); }\
catch (boost::exception&e){ mace::cmt::detail::log( std::cerr, CONSOLE_RED, __FILE__, __LINE__, __func__, "Invalid logs: %1%", boost::diagnostic_information(e) ); } \
catch (std::exception&e){ mace::cmt::detail::log( std::cerr, CONSOLE_RED, __FILE__, __LINE__, __func__, "Invalid logs: %1%", boost::diagnostic_information(e) ); } \
catch (...) {mace::cmt::detail::log( std::cerr, CONSOLE_RED, __FILE__, __LINE__, __func__, "Invalid logs - exception while formating args" ); } \
}while(false)
Definition at line 98 of file log.hpp.