11#define LIBCARLA_LOG_LEVEL_DEBUG 10
12#define LIBCARLA_LOG_LEVEL_INFO 20
13#define LIBCARLA_LOG_LEVEL_WARNING 30
14#define LIBCARLA_LOG_LEVEL_ERROR 40
15#define LIBCARLA_LOG_LEVEL_CRITICAL 50
16#define LIBCARLA_LOG_LEVEL_NONE 100
18#ifndef LIBCARLA_LOG_LEVEL
20# define LIBCARLA_LOG_LEVEL LIBCARLA_LOG_LEVEL_WARNING
22# define LIBCARLA_LOG_LEVEL LIBCARLA_LOG_LEVEL_INFO
50 template <
typename Arg,
typename ... Args>
53 out << std::boolalpha << std::forward<Arg>(arg);
54 using expander =
int[];
55 (void) expander{0, (void(out <<
' ' << std::forward<Args>(args)), 0) ...};
58 template <
typename ... Args>
59 static inline void log(Args && ... args) {
65#if LIBCARLA_LOG_LEVEL <= LIBCARLA_LOG_LEVEL_DEBUG
67 template <
typename ... Args>
74 template <
typename ... Args>
75 static inline void log_debug(Args && ...) {}
79#if LIBCARLA_LOG_LEVEL <= LIBCARLA_LOG_LEVEL_INFO
81 template <
typename ... Args>
82 static inline void log_info(Args && ... args) {
88 template <
typename ... Args>
89 static inline void log_info(Args && ...) {}
93#if LIBCARLA_LOG_LEVEL <= LIBCARLA_LOG_LEVEL_WARNING
95 template <
typename ... Args>
102 template <
typename ... Args>
107#if LIBCARLA_LOG_LEVEL <= LIBCARLA_LOG_LEVEL_ERROR
109 template <
typename ... Args>
116 template <
typename ... Args>
117 static inline void log_error(Args && ...) {}
121#if LIBCARLA_LOG_LEVEL <= LIBCARLA_LOG_LEVEL_CRITICAL
123 template <
typename ... Args>
130 template <
typename ... Args>
141#if LIBCARLA_LOG_LEVEL <= LIBCARLA_LOG_LEVEL_DEBUG
142# define LOG_DEBUG_ONLY(code) code
144# define LOG_DEBUG_ONLY(code)
147#if LIBCARLA_LOG_LEVEL <= LIBCARLA_LOG_LEVEL_INFO
148# define LOG_INFO_ONLY(code) code
150# define LOG_INFO_ONLY(code)
static LIBCARLA_NOINLINE void write_to_stream(std::ostream &out, Arg &&arg, Args &&... args)
static void log(Args &&... args)
This file contains definitions of common data structures used in traffic manager.
static void log_error(Args &&... args)
static void log_info(Args &&... args)
static void log_warning(Args &&... args)
static void log_critical(Args &&... args)
static void log_debug(Args &&... args)