#include <spdlog/spdlog.h>
#include <spdlog/fmt/ostr.h>
#include <boost/property_tree/ptree.hpp>
Go to the source code of this file.
|  | 
| #define | SPDLOG_ACTIVE_LEVEL   SPDLOG_LEVEL_TRACE | 
|  | 
| #define | KB_TRACE   SPDLOG_TRACE | 
|  | 
| #define | KB_DEBUG   SPDLOG_DEBUG | 
|  | 
| #define | KB_INFO   SPDLOG_INFO | 
|  | 
| #define | KB_WARN   SPDLOG_WARN | 
|  | 
| #define | KB_ERROR   SPDLOG_ERROR | 
|  | 
| #define | KB_CRITICAL   SPDLOG_CRITICAL | 
|  | 
| #define | KB_LOGGER_CALL(file,  line,  level, ...)   	spdlog::default_logger_raw()->log(spdlog::source_loc{file, line, SPDLOG_FUNCTION}, level, __VA_ARGS__) | 
|  | 
| #define | KB_TRACE1(file,  line, ...)   KB_LOGGER_CALL(file, line, spdlog::level::trace, __VA_ARGS__) | 
|  | 
| #define | KB_DEBUG1(file,  line, ...)   KB_LOGGER_CALL(file, line, spdlog::level::debug, __VA_ARGS__) | 
|  | 
| #define | KB_INFO1(file,  line, ...)   KB_LOGGER_CALL(file, line, spdlog::level::info, __VA_ARGS__) | 
|  | 
| #define | KB_WARN1(file,  line, ...)   KB_LOGGER_CALL(file, line, spdlog::level::warn, __VA_ARGS__) | 
|  | 
| #define | KB_ERROR1(file,  line, ...)   KB_LOGGER_CALL(file, line, spdlog::level::err, __VA_ARGS__) | 
|  | 
| #define | KB_CRITICAL1(file,  line, ...)   KB_LOGGER_CALL(file, line, spdlog::level::critical, __VA_ARGS__) | 
|  | 
| #define | KB_LOGGED_TRY_CATCH(name,  type,  goal) | 
|  | 
| #define | KB_LOGGED_TRY_EXCEPT(name,  type,  goal,  except) | 
|  | 
◆ KB_CRITICAL
      
        
          | #define KB_CRITICAL   SPDLOG_CRITICAL | 
      
 
 
◆ KB_CRITICAL1
      
        
          | #define KB_CRITICAL1 | ( |  | file, | 
        
          |  |  |  | line, | 
        
          |  |  |  | ... | 
        
          |  | ) |  | KB_LOGGER_CALL(file, line, spdlog::level::critical, __VA_ARGS__) | 
      
 
 
◆ KB_DEBUG
      
        
          | #define KB_DEBUG   SPDLOG_DEBUG | 
      
 
 
◆ KB_DEBUG1
      
        
          | #define KB_DEBUG1 | ( |  | file, | 
        
          |  |  |  | line, | 
        
          |  |  |  | ... | 
        
          |  | ) |  | KB_LOGGER_CALL(file, line, spdlog::level::debug, __VA_ARGS__) | 
      
 
 
◆ KB_ERROR
      
        
          | #define KB_ERROR   SPDLOG_ERROR | 
      
 
 
◆ KB_ERROR1
      
        
          | #define KB_ERROR1 | ( |  | file, | 
        
          |  |  |  | line, | 
        
          |  |  |  | ... | 
        
          |  | ) |  | KB_LOGGER_CALL(file, line, spdlog::level::err, __VA_ARGS__) | 
      
 
 
◆ KB_INFO
      
        
          | #define KB_INFO   SPDLOG_INFO | 
      
 
 
◆ KB_INFO1
      
        
          | #define KB_INFO1 | ( |  | file, | 
        
          |  |  |  | line, | 
        
          |  |  |  | ... | 
        
          |  | ) |  | KB_LOGGER_CALL(file, line, spdlog::level::info, __VA_ARGS__) | 
      
 
 
◆ KB_LOGGED_TRY_CATCH
      
        
          | #define KB_LOGGED_TRY_CATCH | ( |  | name, | 
        
          |  |  |  | type, | 
        
          |  |  |  | goal | 
        
          |  | ) |  |  | 
      
 
Value:    do { \
    try { goal } \
    catch (const boost::python::error_already_set&) \
    catch (KnowRobError &e) \
    catch (std::exception &e) \
    { 
KB_ERROR(
"{}. {}", Logger::formatGenericFailure(name,
type), e.what()); } \
    catch (...) \
    { 
KB_ERROR(
"{}. Unknown failure!", Logger::formatGenericFailure(name,
type)); }  \
} while(0)
#define LOG_KNOWROB_ERROR(err, msg,...)
Catch any exception that goal may throw and log it as an error. 
Definition at line 142 of file Logger.h.
 
 
◆ KB_LOGGED_TRY_EXCEPT
      
        
          | #define KB_LOGGED_TRY_EXCEPT | ( |  | name, | 
        
          |  |  |  | type, | 
        
          |  |  |  | goal, | 
        
          |  |  |  | except | 
        
          |  | ) |  |  | 
      
 
Value:    do { \
    try { goal } \
    catch (const boost::python::error_already_set&) \
    catch (KnowRobError &e) \
    catch (std::exception &e) \
    { 
KB_ERROR(
"{}: {}", Logger::formatGenericFailure(name,
type), e.what()); except } \
    catch (...) \
    { 
KB_ERROR(
"{}: unknown failure.", Logger::formatGenericFailure(name,
type)); except }  \
} while(0)
Catch any exception that goal may throw and log it as an error. 
Definition at line 157 of file Logger.h.
 
 
◆ KB_LOGGER_CALL
      
        
          | #define KB_LOGGER_CALL | ( |  | file, | 
        
          |  |  |  | line, | 
        
          |  |  |  | level, | 
        
          |  |  |  | ... | 
        
          |  | ) |  | spdlog::default_logger_raw()->log(spdlog::source_loc{file, line, SPDLOG_FUNCTION}, level, __VA_ARGS__) | 
      
 
 
◆ KB_TRACE
      
        
          | #define KB_TRACE   SPDLOG_TRACE | 
      
 
 
◆ KB_TRACE1
      
        
          | #define KB_TRACE1 | ( |  | file, | 
        
          |  |  |  | line, | 
        
          |  |  |  | ... | 
        
          |  | ) |  | KB_LOGGER_CALL(file, line, spdlog::level::trace, __VA_ARGS__) | 
      
 
 
◆ KB_WARN
      
        
          | #define KB_WARN   SPDLOG_WARN | 
      
 
 
◆ KB_WARN1
      
        
          | #define KB_WARN1 | ( |  | file, | 
        
          |  |  |  | line, | 
        
          |  |  |  | ... | 
        
          |  | ) |  | KB_LOGGER_CALL(file, line, spdlog::level::warn, __VA_ARGS__) | 
      
 
 
◆ SPDLOG_ACTIVE_LEVEL
      
        
          | #define SPDLOG_ACTIVE_LEVEL   SPDLOG_LEVEL_TRACE |