| 1 | namespace simdjson { |
| 2 | namespace SIMDJSON_IMPLEMENTATION { |
| 3 | namespace ondemand { |
| 4 | |
| 5 | class json_iterator; |
| 6 | class value_iterator; |
| 7 | |
| 8 | namespace logger { |
| 9 | |
| 10 | #if SIMDJSON_VERBOSE_LOGGING |
| 11 | static constexpr const bool LOG_ENABLED = true; |
| 12 | #else |
| 13 | static constexpr const bool LOG_ENABLED = false; |
| 14 | #endif |
| 15 | |
| 16 | // We do not want these functions to be 'really inlined' since real inlining is |
| 17 | // for performance purposes and if you are using the loggers, you do not care about |
| 18 | // performance (or should not). |
| 19 | static inline void log_headers() noexcept; |
| 20 | 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) noexcept; |
| 21 | 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) noexcept; |
| 22 | static inline void log_event(const json_iterator &iter, const char *type, std::string_view detail="" , int delta=0, int depth_delta=0) noexcept; |
| 23 | static inline void log_value(const json_iterator &iter, token_position index, depth_t depth, const char *type, std::string_view detail="" ) noexcept; |
| 24 | static inline void log_value(const json_iterator &iter, const char *type, std::string_view detail="" , int delta=-1, int depth_delta=0) noexcept; |
| 25 | static inline void log_start_value(const json_iterator &iter, token_position index, depth_t depth, const char *type, std::string_view detail="" ) noexcept; |
| 26 | static inline void log_start_value(const json_iterator &iter, const char *type, int delta=-1, int depth_delta=0) noexcept; |
| 27 | static inline void log_end_value(const json_iterator &iter, const char *type, int delta=-1, int depth_delta=0) noexcept; |
| 28 | static inline void log_error(const json_iterator &iter, token_position index, depth_t depth, const char *error, const char *detail="" ) noexcept; |
| 29 | static inline void log_error(const json_iterator &iter, const char *error, const char *detail="" , int delta=-1, int depth_delta=0) noexcept; |
| 30 | |
| 31 | static inline void log_event(const value_iterator &iter, const char *type, std::string_view detail="" , int delta=0, int depth_delta=0) noexcept; |
| 32 | static inline void log_value(const value_iterator &iter, const char *type, std::string_view detail="" , int delta=-1, int depth_delta=0) noexcept; |
| 33 | static inline void log_start_value(const value_iterator &iter, const char *type, int delta=-1, int depth_delta=0) noexcept; |
| 34 | static inline void log_end_value(const value_iterator &iter, const char *type, int delta=-1, int depth_delta=0) noexcept; |
| 35 | static inline void log_error(const value_iterator &iter, const char *error, const char *detail="" , int delta=-1, int depth_delta=0) noexcept; |
| 36 | |
| 37 | } // namespace logger |
| 38 | } // namespace ondemand |
| 39 | } // namespace SIMDJSON_IMPLEMENTATION |
| 40 | } // namespace simdjson |
| 41 | |