- Aldebaran documentation |
- C++ Libraries |
- index

libqi-api 2.8.7.4

- Main Page
- Related Pages
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Namespaces | Macros | Typedefs | Functions
log.hxx File Reference
`#include <boost/format.hpp>`
`#include <boost/noncopyable.hpp>`
`#include <boost/preprocessor/cat.hpp>`

Go to the source code of this file.

## Classes
class | qi::log::detail::NullStream
struct | qi::log::detail::Category
class | qi::log::LogStream

## Namespaces
| qi
| Deprecated in 2.5. Use int8_t from <cstdint>.
| qi::log
| Log functions with different levels of verbosity.
| qi::log::detail

## Macros
#define | _QI_DETAIL_LOG_HXX_
#define | _qiLogDebug(...) qi::log::LogStream(qi::LogLevel_Debug, __FILE__, __FUNCTION__, __LINE__, __VA_ARGS__).self()
#define | _qiLogVerbose(...) qi::log::LogStream(qi::LogLevel_Verbose, __FILE__, __FUNCTION__, __LINE__, __VA_ARGS__).self()
#define | _qiLogInfo(...) qi::log::LogStream(qi::LogLevel_Info, __FILE__, __FUNCTION__, __LINE__, __VA_ARGS__).self()
#define | _qiLogWarning(...) qi::log::LogStream(qi::LogLevel_Warning, __FILE__, __FUNCTION__, __LINE__, __VA_ARGS__).self()
#define | _qiLogError(...) qi::log::LogStream(qi::LogLevel_Error, __FILE__, __FUNCTION__, __LINE__, __VA_ARGS__).self()
#define | _qiLogFatal(...) qi::log::LogStream(qi::LogLevel_Fatal, __FILE__, __FUNCTION__, __LINE__, __VA_ARGS__).self()
#define | _QI_FORMAT_ELEM(_, a, elem) % (elem)
#define | _QI_LOG_FORMAT(Msg,...) QI_CAT(_QI_LOG_FORMAT_HASARG_, _QI_LOG_ISEMPTY(__VA_ARGS__))(Msg, __VA_ARGS__)
#define | _QI_LOG_FORMAT_HASARG_0(Msg,...) boost::str(::qi::log::detail::getFormat(Msg) QI_VAARGS_APPLY(_QI_FORMAT_ELEM, _, __VA_ARGS__ ))
#define | _QI_LOG_FORMAT_HASARG_1(Msg,...) Msg
#define | _QI_SECOND(a,...) __VA_ARGS__
#define | _QI_LOG_VARIABLE_SUFFIX _x
#define | _QI_LOG_CATEGORY_GET() BOOST_PP_CAT(_qi_log_category, _QI_LOG_VARIABLE_SUFFIX)
#define | _QI_LOG_MESSAGE(Type, Message)
#define | _QI_LOG_MESSAGE_STREAM(Type, TypeCased,...) QI_CAT(_QI_LOG_MESSAGE_STREAM_HASCAT_, _QI_LOG_ISEMPTY( __VA_ARGS__))(Type, TypeCased, __VA_ARGS__)
#define | _QI_LOG_MESSAGE_STREAM_HASCAT_1(Type, TypeCased,...)
#define | _QI_LOG_MESSAGE_STREAM_HASCAT_0(...) _QI_LOG_MESSAGE_STREAM_HASCAT_0_BOUNCE(__VA_ARGS__)
#define | _QI_LOG_MESSAGE_STREAM_HASCAT_0_BOUNCE(Type, TypeCased, cat,...) QI_CAT(_QI_LOG_MESSAGE_STREAM_HASCAT_HASFORMAT_, _QI_LOG_ISEMPTY( __VA_ARGS__))(Type, TypeCased, cat, __VA_ARGS__)
#define | _QI_LOG_MESSAGE_STREAM_HASCAT_HASFORMAT_1(Type, TypeCased, cat,...) BOOST_PP_CAT(_qiLog,TypeCased)(cat)
#define | _QI_LOG_MESSAGE_STREAM_HASCAT_HASFORMAT_0(Type, TypeCased, cat,...) BOOST_PP_CAT(_qiLog, TypeCased)(cat, _QI_LOG_FORMAT(__VA_ARGS__))
#define | _QI_LOG_REVERSE 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0
#define | _QI_LOG_REVERSEEMPTY 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1
#define | _QI_LOG_ARGN(a, b, c, d, e, f, g, h, i, N,...) N
#define | _QI_LOG_NARG_(dummy,...) _QI_LOG_ARGN(__VA_ARGS__)
#define | _QI_LOG_NARG(...) _QI_LOG_NARG_(dummy, ##__VA_ARGS__, _QI_LOG_REVERSE)
#define | _QI_LOG_ISEMPTY(...) _QI_LOG_NARG_(dummy, ##__VA_ARGS__, _QI_LOG_REVERSEEMPTY)

## Typedefs
using | qi::log::CategoryType = detail::Category *
| Catergory Informations. More...

## Functions
bool | qi::log::detail::qiFalse ()
bool | qi::log::detail::operator< (bool, const NullStream &)
boost::format | qi::log::detail::getFormat (const std::string &s)
std::vector< std::tuple < std::string, qi::LogLevel > > | qi::log::detail::parseFilterRules (const std::string &rules)
bool | qi::log::isVisible (CategoryType category, qi::LogLevel level)
| Check if the given combination of category and level is enable. More...

## Macro Definition Documentation

#define _QI_DETAIL_LOG_HXX_

Definition at line 9 of file log.hxx.

#define _QI_FORMAT_ELEM | ( |  | _,
|  |  | a,
|  |  | elem
| ) |  | % (elem)

Definition at line 52 of file log.hxx.

#define _QI_LOG_ARGN | ( |  | a,
|  |  | b,
|  |  | c,
|  |  | d,
|  |  | e,
|  |  | f,
|  |  | g,
|  |  | h,
|  |  | i,
|  |  | N,
|  |  | ...
| ) |  | N

Definition at line 149 of file log.hxx.

#define _QI_LOG_CATEGORY_GET | ( |  | ) | BOOST_PP_CAT(_qi_log_category, _QI_LOG_VARIABLE_SUFFIX)

Definition at line 74 of file log.hxx.

#define _QI_LOG_FORMAT | ( |  | Msg,
|  |  | ...
| ) |  | QI_CAT(_QI_LOG_FORMAT_HASARG_, _QI_LOG_ISEMPTY(__VA_ARGS__))(Msg, __VA_ARGS__)

Definition at line 54 of file log.hxx.

#define _QI_LOG_FORMAT_HASARG_0 | ( |  | Msg,
|  |  | ...
| ) |  | boost::str(::qi::log::detail::getFormat(Msg) QI_VAARGS_APPLY(_QI_FORMAT_ELEM, _, __VA_ARGS__ ))

Definition at line 57 of file log.hxx.

#define _QI_LOG_FORMAT_HASARG_1 | ( |  | Msg,
|  |  | ...
| ) |  | Msg

Definition at line 60 of file log.hxx.

#define _QI_LOG_ISEMPTY | ( |  | ... | ) | _QI_LOG_NARG_(dummy, ##__VA_ARGS__, _QI_LOG_REVERSEEMPTY)

Definition at line 152 of file log.hxx.

#define _QI_LOG_MESSAGE | ( |  | Type,
|  |  | Message
| ) |  |

Value:
do \
{ \
if (::qi::log::isVisible(_QI_LOG_CATEGORY_GET(), ::qi::Type)) \
::qi::log::log(::qi::Type, \
_QI_LOG_CATEGORY_GET(), \
Message, \
__FILE__, __FUNCTION__, __LINE__); \
} \
while (false)
qi::log::log
void log(const qi::LogLevel verb, const char *category, const char *msg, const char *file="", const char *fct="", const int line=0)
Log function. You should call qiLog* macros instead.
_QI_LOG_CATEGORY_GET
#define _QI_LOG_CATEGORY_GET()
Definition: log.hxx:74
qi::log::isVisible
bool isVisible(CategoryType category, qi::LogLevel level)
Check if the given combination of category and level is enable.
Definition: log.hxx:219

Definition at line 88 of file log.hxx.

#define _QI_LOG_MESSAGE_STREAM | ( |  | Type,
|  |  | TypeCased,
|  |  | ...
| ) |  | QI_CAT(_QI_LOG_MESSAGE_STREAM_HASCAT_, _QI_LOG_ISEMPTY( __VA_ARGS__))(Type, TypeCased, __VA_ARGS__)

Definition at line 104 of file log.hxx.

#define _QI_LOG_MESSAGE_STREAM_HASCAT_0 | ( |  | ... | ) | _QI_LOG_MESSAGE_STREAM_HASCAT_0_BOUNCE(__VA_ARGS__)

Definition at line 116 of file log.hxx.

#define _QI_LOG_MESSAGE_STREAM_HASCAT_0_BOUNCE | ( |  | Type,
|  |  | TypeCased,
|  |  | cat,
|  |  | ...
| ) |  | QI_CAT(_QI_LOG_MESSAGE_STREAM_HASCAT_HASFORMAT_, _QI_LOG_ISEMPTY( __VA_ARGS__))(Type, TypeCased, cat, __VA_ARGS__)

Definition at line 120 of file log.hxx.

#define _QI_LOG_MESSAGE_STREAM_HASCAT_1 | ( |  | Type,
|  |  | TypeCased,
|  |  | ...
| ) |  |

Value:
::qi::log::isVisible(_QI_LOG_CATEGORY_GET(), ::qi::Type) \
&& BOOST_PP_CAT(_qiLog, TypeCased)(_QI_LOG_CATEGORY_GET())
_QI_LOG_CATEGORY_GET
#define _QI_LOG_CATEGORY_GET()
Definition: log.hxx:74
qi::log::isVisible
bool isVisible(CategoryType category, qi::LogLevel level)
Check if the given combination of category and level is enable.
Definition: log.hxx:219

Definition at line 108 of file log.hxx.

#define _QI_LOG_MESSAGE_STREAM_HASCAT_HASFORMAT_0 | ( |  | Type,
|  |  | TypeCased,
|  |  | cat,
|  |  | ...
| ) |  | BOOST_PP_CAT(_qiLog, TypeCased)(cat, _QI_LOG_FORMAT(__VA_ARGS__))

Definition at line 129 of file log.hxx.

#define _QI_LOG_MESSAGE_STREAM_HASCAT_HASFORMAT_1 | ( |  | Type,
|  |  | TypeCased,
|  |  | cat,
|  |  | ...
| ) |  | BOOST_PP_CAT(_qiLog,TypeCased)(cat)

Definition at line 125 of file log.hxx.

#define _QI_LOG_NARG | ( |  | ... | ) | _QI_LOG_NARG_(dummy, ##__VA_ARGS__, _QI_LOG_REVERSE)

Definition at line 151 of file log.hxx.

#define _QI_LOG_NARG_ | ( |  | dummy,
|  |  | ...
| ) |  | _QI_LOG_ARGN(__VA_ARGS__)

Definition at line 150 of file log.hxx.

#define _QI_LOG_REVERSE 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0

Definition at line 147 of file log.hxx.

#define _QI_LOG_REVERSEEMPTY 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1

Definition at line 148 of file log.hxx.

#define _QI_LOG_VARIABLE_SUFFIX _x

Definition at line 71 of file log.hxx.

#define _QI_SECOND | ( |  | a,
|  |  | ...
| ) |  | __VA_ARGS__

Definition at line 62 of file log.hxx.

#define _qiLogDebug | ( |  | ... | ) | qi::log::LogStream(qi::LogLevel_Debug, __FILE__, __FUNCTION__, __LINE__, __VA_ARGS__).self()

Definition at line 18 of file log.hxx.

#define _qiLogError | ( |  | ... | ) | qi::log::LogStream(qi::LogLevel_Error, __FILE__, __FUNCTION__, __LINE__, __VA_ARGS__).self()

Definition at line 42 of file log.hxx.

#define _qiLogFatal | ( |  | ... | ) | qi::log::LogStream(qi::LogLevel_Fatal, __FILE__, __FUNCTION__, __LINE__, __VA_ARGS__).self()

Definition at line 48 of file log.hxx.

#define _qiLogInfo | ( |  | ... | ) | qi::log::LogStream(qi::LogLevel_Info, __FILE__, __FUNCTION__, __LINE__, __VA_ARGS__).self()

Definition at line 30 of file log.hxx.

#define _qiLogVerbose | ( |  | ... | ) | qi::log::LogStream(qi::LogLevel_Verbose, __FILE__, __FUNCTION__, __LINE__, __VA_ARGS__).self()

Definition at line 24 of file log.hxx.

#define _qiLogWarning | ( |  | ... | ) | qi::log::LogStream(qi::LogLevel_Warning, __FILE__, __FUNCTION__, __LINE__, __VA_ARGS__).self()

Definition at line 36 of file log.hxx.