1 #ifndef SIMDJSON_GENERIC_ONDEMAND_LOGGER_H
3 #ifndef SIMDJSON_CONDITIONAL_INCLUDE
4 #define SIMDJSON_GENERIC_ONDEMAND_LOGGER_H
5 #include "simdjson/generic/ondemand/base.h"
9 namespace SIMDJSON_IMPLEMENTATION {
17 enum class log_level : int32_t {
22 #if SIMDJSON_VERBOSE_LOGGING
23 static constexpr
const bool LOG_ENABLED =
true;
25 static constexpr
const bool LOG_ENABLED =
false;
31 static inline void log_headers() noexcept;
33 template <typename... Args>
34 static inline
void log_line(const json_iterator &iter, token_position index,
depth_t depth, const
char *title_prefix, const
char *title, std::string_view detail, logger::log_level level, Args&&... args) noexcept;
35 template <typename... Args>
36 static inline
void log_line(const json_iterator &iter, const
char *title_prefix, const
char *title, std::string_view detail,
int delta,
int depth_delta, logger::log_level level, Args&&... args) noexcept;
37 static inline
void log_event(const json_iterator &iter, const
char *type, std::string_view detail="",
int delta=0,
int depth_delta=0) noexcept;
38 static inline
void log_value(const json_iterator &iter, token_position index,
depth_t depth, const
char *type, std::string_view detail="") noexcept;
39 static inline
void log_value(const json_iterator &iter, const
char *type, std::string_view detail="",
int delta=-1,
int depth_delta=0) noexcept;
40 static inline
void log_start_value(const json_iterator &iter, token_position index,
depth_t depth, const
char *type, std::string_view detail="") noexcept;
41 static inline
void log_start_value(const json_iterator &iter, const
char *type,
int delta=-1,
int depth_delta=0) noexcept;
42 static inline
void log_end_value(const json_iterator &iter, const
char *type,
int delta=-1,
int depth_delta=0) noexcept;
44 static inline
void log_error(const json_iterator &iter, token_position index,
depth_t depth, const
char *error, const
char *detail="") noexcept;
45 static inline
void log_error(const json_iterator &iter, const
char *error, const
char *detail="",
int delta=-1,
int depth_delta=0) noexcept;
47 static inline
void log_event(const value_iterator &iter, const
char *type, std::string_view detail="",
int delta=0,
int depth_delta=0) noexcept;
48 static inline
void log_value(const value_iterator &iter, const
char *type, std::string_view detail="",
int delta=-1,
int depth_delta=0) noexcept;
49 static inline
void log_start_value(const value_iterator &iter, const
char *type,
int delta=-1,
int depth_delta=0) noexcept;
50 static inline
void log_end_value(const value_iterator &iter, const
char *type,
int delta=-1,
int depth_delta=0) noexcept;
51 static inline
void log_error(const value_iterator &iter, const
char *error, const
char *detail="",
int delta=-1,
int depth_delta=0) noexcept;
int32_t depth_t
Represents the depth of a JSON value (number of nested arrays/objects).
The top level simdjson namespace, containing everything the library provides.