12 #ifndef DOCWIRE_LOG_CORE_H
13 #define DOCWIRE_LOG_CORE_H
15 #include "core_export.h"
16 #include "serialization_base.h"
17 #include "source_location.h"
21 #include <string_view>
61 DOCWIRE_CORE_EXPORT
void set_filter(
const std::string& filter_spec);
93 DOCWIRE_CORE_EXPORT
bool is_enabled(
const source_location& location, std::span<const std::string_view> entry_tags);
94 DOCWIRE_CORE_EXPORT
bool is_logging_enabled();
Provides a modern, high-performance, and structured logging framework.
DOCWIRE_CORE_EXPORT void set_sink(std::function< void(const log::record &)> callback)
Sets the global callback function that will receive all enabled log records.
DOCWIRE_CORE_EXPORT std::function< void(const record &)> get_sink()
Gets the current log sink function.
DOCWIRE_CORE_EXPORT serialization::object create_base_metadata(source_location location)
Creates a base serialization object with common metadata.
DOCWIRE_CORE_EXPORT std::string get_filter()
Gets the current log filter specification string.
A fallback implementation of source_location for compilers that do not support std::source_location.
Represents a serialized array (list of values).
Represents a serialized object (map of string keys to values).