88 #include <string_view>
121 virtual bool init(std::string_view app_name) noexcept = 0;
136 virtual bool log(
int level, std::string_view str) noexcept = 0;
Pure-virtual interface that every shared-library logger backend implements.
Definition: logger_plugin_interface.h:106
virtual void flush() noexcept
Drains records accepted by log before this call.
Definition: logger_plugin_interface.h:145
LoggerPluginInterface()=default
virtual ~LoggerPluginInterface()=default
virtual bool log(int level, std::string_view str) noexcept=0
Writes a single record to the backend.
virtual bool init(std::string_view app_name) noexcept=0
Initialises the backend immediately after the plugin instance is constructed.
#define VLINK_DISALLOW_COPY_AND_ASSIGN(classname)
Deletes the copy constructor and copy-assignment operator of classname.
Definition: macros.h:174
Strongly-typed shared-library plugin loader with ID and version verification.
#define VLINK_PLUGIN_REGISTER(InterfaceType)
Declares a plugin's identity from the demangled name of its abstract interface.
Definition: plugin.h:359