Defines logging macros. More...
#include <assert.h>
#include <boost/shared_ptr.hpp>
#include <icl_core/TimeSpan.h>
#include <icl_core/TimeStamp.h>
#include "icl_core_logging/Constants.h"
#include "icl_core_logging/ImportExport.h"
#include "icl_core_logging/LoggingManager.h"
#include "icl_core_logging/LogStream.h"
#include "icl_core_logging/ThreadStream.h"
#include "icl_core_config/GetoptParser.h"
#include "icl_core_logging/tLoggingManager.h"
#include "icl_core_logging/tLogLevel.h"
#include "icl_core_logging/LoggingMacros_LOGGING.h"
#include "icl_core_logging/LoggingMacros_LOGGING_FMT.h"
#include "icl_core_logging/LoggingMacros_LLOGGING.h"
#include "icl_core_logging/LoggingMacros_LLOGGING_FMT.h"
#include "icl_core_logging/LoggingMacros_MLOGGING.h"
#include "icl_core_logging/LoggingMacros_MLOGGING_FMT.h"
#include "icl_core_logging/LoggingMacros_SLOGGING.h"
#include "icl_core_logging/LoggingMacros_SLOGGING_FMT.h"
Go to the source code of this file.
#define DECLARE_LOG_STREAM | ( | name | ) | class DECLARE_LOG_STREAM_CLASS_DEFINITION(name) |
Definition at line 101 of file icl_core_logging/Logging.h.
#define DECLARE_LOG_STREAM_CLASS_DEFINITION | ( | name | ) |
name : public ::icl_core::logging::LogStream \ { \ public: \ static ::icl_core::logging::LogStream& instance(); \ static ::icl_core::logging::LogStream *create(); \ private: \ name() \ : LogStream(#name) \ { } \ ~name() { } \ static name *m_instance; \ friend class ::icl_core::logging::LoggingManager; \ friend class ::icl_core::logging::hidden::LogStreamRegistrar; \ };
Definition at line 61 of file icl_core_logging/Logging.h.
#define DECLARE_LOG_STREAM_IMPORT_EXPORT | ( | name, | |
decl | |||
) | class decl DECLARE_LOG_STREAM_CLASS_DEFINITION(name) |
Definition at line 102 of file icl_core_logging/Logging.h.
#define DECLARE_LOG_STREAM_OPERATOR | ( | object_type | ) |
::icl_core::logging::ThreadStream & operator << (::icl_core::logging::ThreadStream &str, \ const object_type &object);
Definition at line 135 of file icl_core_logging/Logging.h.
#define LOG_THREAD_STREAM | ( | name | ) | name::instance().ThreadStream() |
Definition at line 58 of file icl_core_logging/Logging.h.
#define REGISTER_LOG_OUTPUT_STREAM | ( | name, | |
factory | |||
) | ::icl_core::logging::hidden::LogOutputStreamRegistrar registrar##name(#name, factory); |
Definition at line 132 of file icl_core_logging/Logging.h.
#define REGISTER_LOG_STREAM | ( | name | ) |
name * name::m_instance = NULL; \ ::icl_core::logging::LogStream& name::instance() \ { \ if (m_instance == NULL) \ { \ std::cout << "WARNING: Logging Instance is null, did you initialize the logging framework?\nYou should initialize the logging framework at the beginning of your program. This will also enable setting the log level on the command line." << std::endl; \ ::icl_core::logging::LoggingManager::instance().initialize(); \ assert(m_instance != NULL && "Tried to initialize LoggingManager but m_instance still not available."); \ return *m_instance; \ } \ else \ { \ return *m_instance; \ } \ } \ ::icl_core::logging::LogStream * name::create() \ { \ if (m_instance == NULL) \ { \ m_instance = new name; \ } \ return m_instance; \ } \ ::icl_core::logging::hidden::LogStreamRegistrar registrar##name(#name, &name::create);
Definition at line 106 of file icl_core_logging/Logging.h.
#define REGISTER_LOG_STREAM_OPERATOR | ( | object_type | ) |
::icl_core::logging::ThreadStream & operator << (::icl_core::logging::ThreadStream &str, \ const object_type &object) \ { \ std::ostringstream stream; \ stream << object; \ str << stream.str(); \ return str; \ }
Definition at line 148 of file icl_core_logging/Logging.h.