Classes | Namespaces | Macros | Enumerations | Functions
logger.h File Reference
#include <map>
#include <dynamic-graph/linear-algebra.h>
#include <dynamic-graph/real-time-logger-def.h>
#include <boost/assign.hpp>
#include <boost/preprocessor/stringize.hpp>
#include <dynamic-graph/deprecated.hh>
#include <fstream>
#include <iomanip>
#include <sstream>
Include dependency graph for logger.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  dynamicgraph::Logger
 Class for logging messages. More...
 

Namespaces

 dynamicgraph
 

Macros

#define _DYNAMIC_GRAPH_ENTITY_MSG(entity, type)   (entity).logger().stream(type, __FILE__ BOOST_PP_STRINGIZE(__LINE__))
 
#define DYNAMIC_GRAPH_ENTITY_DEBUG(entity)   _DYNAMIC_GRAPH_ENTITY_MSG(entity, MSG_TYPE_DEBUG)
 
#define DYNAMIC_GRAPH_ENTITY_DEBUG_STREAM(entity)   _DYNAMIC_GRAPH_ENTITY_MSG(entity, MSG_TYPE_DEBUG_STREAM)
 
#define DYNAMIC_GRAPH_ENTITY_ERROR(entity)   _DYNAMIC_GRAPH_ENTITY_MSG(entity, MSG_TYPE_ERROR)
 
#define DYNAMIC_GRAPH_ENTITY_ERROR_STREAM(entity)   _DYNAMIC_GRAPH_ENTITY_MSG(entity, MSG_TYPE_ERROR_STREAM)
 
#define DYNAMIC_GRAPH_ENTITY_INFO(entity)   _DYNAMIC_GRAPH_ENTITY_MSG(entity, MSG_TYPE_INFO)
 
#define DYNAMIC_GRAPH_ENTITY_INFO_STREAM(entity)   _DYNAMIC_GRAPH_ENTITY_MSG(entity, MSG_TYPE_INFO_STREAM)
 
#define DYNAMIC_GRAPH_ENTITY_WARNING(entity)   _DYNAMIC_GRAPH_ENTITY_MSG(entity, MSG_TYPE_WARNING)
 
#define DYNAMIC_GRAPH_ENTITY_WARNING_STREAM(entity)   _DYNAMIC_GRAPH_ENTITY_MSG(entity, MSG_TYPE_WARNING_STREAM)
 
#define LOGGER_EXPORT
 
#define LOGGER_VERBOSITY_ALL
 
#define SEND_DEBUG_STREAM_MSG(msg)   SEND_MSG(msg, MSG_TYPE_DEBUG_STREAM)
 
#define SEND_ERROR_STREAM_MSG(msg)   SEND_MSG(msg, MSG_TYPE_ERROR_STREAM)
 
#define SEND_INFO_STREAM_MSG(msg)   SEND_MSG(msg, MSG_TYPE_INFO_STREAM)
 
#define SEND_MSG(msg, type)   sendMsg(msg, type, __FILE__ ":" BOOST_PP_STRINGIZE(__LINE__))
 
#define SEND_WARNING_STREAM_MSG(msg)   SEND_MSG(msg, MSG_TYPE_WARNING_STREAM)
 

Enumerations

enum  dynamicgraph::LoggerVerbosity {
  dynamicgraph::VERBOSITY_ALL = MSG_TYPE_DEBUG, dynamicgraph::VERBOSITY_INFO_WARNING_ERROR = MSG_TYPE_INFO, dynamicgraph::VERBOSITY_WARNING_ERROR = MSG_TYPE_WARNING, dynamicgraph::VERBOSITY_ERROR = MSG_TYPE_ERROR,
  dynamicgraph::VERBOSITY_NONE = 0
}
 
enum  dynamicgraph::MsgType {
  dynamicgraph::MSG_TYPE_TYPE_BITS = 1 << 0 | 1 << 1 | 1 << 2 | 1 << 3, dynamicgraph::MSG_TYPE_STREAM_BIT = 1 << 4, dynamicgraph::MSG_TYPE_DEBUG = 1 << 3, dynamicgraph::MSG_TYPE_INFO = 1 << 2,
  dynamicgraph::MSG_TYPE_WARNING = 1 << 1, dynamicgraph::MSG_TYPE_ERROR = 1 << 0, dynamicgraph::MSG_TYPE_DEBUG_STREAM = MSG_TYPE_DEBUG | MSG_TYPE_STREAM_BIT, dynamicgraph::MSG_TYPE_INFO_STREAM = MSG_TYPE_INFO | MSG_TYPE_STREAM_BIT,
  dynamicgraph::MSG_TYPE_WARNING_STREAM = MSG_TYPE_WARNING | MSG_TYPE_STREAM_BIT, dynamicgraph::MSG_TYPE_ERROR_STREAM = MSG_TYPE_ERROR | MSG_TYPE_STREAM_BIT
}
 

Functions

template<typename T >
std::string dynamicgraph::toString (const T &v, const int precision=3, const int width=-1)
 
template<typename T >
std::string dynamicgraph::toString (const std::vector< T > &v, const int precision=3, const int width=-1, const std::string separator=", ")
 
template<typename T >
std::string dynamicgraph::toString (const Eigen::MatrixBase< T > &v, const int precision=3, const int width=-1, const std::string separator=", ")
 

Macro Definition Documentation

◆ _DYNAMIC_GRAPH_ENTITY_MSG

#define _DYNAMIC_GRAPH_ENTITY_MSG (   entity,
  type 
)    (entity).logger().stream(type, __FILE__ BOOST_PP_STRINGIZE(__LINE__))

Definition at line 73 of file logger.h.

◆ DYNAMIC_GRAPH_ENTITY_DEBUG

#define DYNAMIC_GRAPH_ENTITY_DEBUG (   entity)    _DYNAMIC_GRAPH_ENTITY_MSG(entity, MSG_TYPE_DEBUG)

Definition at line 76 of file logger.h.

◆ DYNAMIC_GRAPH_ENTITY_DEBUG_STREAM

#define DYNAMIC_GRAPH_ENTITY_DEBUG_STREAM (   entity)    _DYNAMIC_GRAPH_ENTITY_MSG(entity, MSG_TYPE_DEBUG_STREAM)

Definition at line 85 of file logger.h.

◆ DYNAMIC_GRAPH_ENTITY_ERROR

#define DYNAMIC_GRAPH_ENTITY_ERROR (   entity)    _DYNAMIC_GRAPH_ENTITY_MSG(entity, MSG_TYPE_ERROR)

Definition at line 82 of file logger.h.

◆ DYNAMIC_GRAPH_ENTITY_ERROR_STREAM

#define DYNAMIC_GRAPH_ENTITY_ERROR_STREAM (   entity)    _DYNAMIC_GRAPH_ENTITY_MSG(entity, MSG_TYPE_ERROR_STREAM)

Definition at line 91 of file logger.h.

◆ DYNAMIC_GRAPH_ENTITY_INFO

#define DYNAMIC_GRAPH_ENTITY_INFO (   entity)    _DYNAMIC_GRAPH_ENTITY_MSG(entity, MSG_TYPE_INFO)

Definition at line 78 of file logger.h.

◆ DYNAMIC_GRAPH_ENTITY_INFO_STREAM

#define DYNAMIC_GRAPH_ENTITY_INFO_STREAM (   entity)    _DYNAMIC_GRAPH_ENTITY_MSG(entity, MSG_TYPE_INFO_STREAM)

Definition at line 87 of file logger.h.

◆ DYNAMIC_GRAPH_ENTITY_WARNING

#define DYNAMIC_GRAPH_ENTITY_WARNING (   entity)    _DYNAMIC_GRAPH_ENTITY_MSG(entity, MSG_TYPE_WARNING)

Definition at line 80 of file logger.h.

◆ DYNAMIC_GRAPH_ENTITY_WARNING_STREAM

#define DYNAMIC_GRAPH_ENTITY_WARNING_STREAM (   entity)    _DYNAMIC_GRAPH_ENTITY_MSG(entity, MSG_TYPE_WARNING_STREAM)

Definition at line 89 of file logger.h.

◆ LOGGER_EXPORT

#define LOGGER_EXPORT

Definition at line 22 of file logger.h.

◆ LOGGER_VERBOSITY_ALL

#define LOGGER_VERBOSITY_ALL

Definition at line 63 of file logger.h.

◆ SEND_DEBUG_STREAM_MSG

#define SEND_DEBUG_STREAM_MSG (   msg)    SEND_MSG(msg, MSG_TYPE_DEBUG_STREAM)

Definition at line 68 of file logger.h.

◆ SEND_ERROR_STREAM_MSG

#define SEND_ERROR_STREAM_MSG (   msg)    SEND_MSG(msg, MSG_TYPE_ERROR_STREAM)

Definition at line 71 of file logger.h.

◆ SEND_INFO_STREAM_MSG

#define SEND_INFO_STREAM_MSG (   msg)    SEND_MSG(msg, MSG_TYPE_INFO_STREAM)

Definition at line 69 of file logger.h.

◆ SEND_MSG

#define SEND_MSG (   msg,
  type 
)    sendMsg(msg, type, __FILE__ ":" BOOST_PP_STRINGIZE(__LINE__))

Definition at line 65 of file logger.h.

◆ SEND_WARNING_STREAM_MSG

#define SEND_WARNING_STREAM_MSG (   msg)    SEND_MSG(msg, MSG_TYPE_WARNING_STREAM)

Definition at line 70 of file logger.h.



dynamic-graph
Author(s): Nicolas Mansard, Olivier Stasse
autogenerated on Sun Jun 25 2023 02:06:03