|
VLink
2.0.0
A high-performance communication middleware
|
Pure-virtual interface that every shared-library logger backend implements. 更多...
#include <logger_plugin_interface.h>
Public 成员函数 | |
| virtual bool | init (std::string_view app_name)=0 |
| Initialises the backend immediately after the plugin instance is constructed. 更多... | |
| virtual bool | log (int level, std::string_view str)=0 |
| Writes a single record to the backend. 更多... | |
Protected 成员函数 | |
| LoggerPluginInterface ()=default | |
| virtual | ~LoggerPluginInterface ()=default |
Pure-virtual interface that every shared-library logger backend implements.
Concrete subclasses use VLINK_PLUGIN_REGISTER internally to expose their factory and destructor functions to the Plugin loader. Instances are owned by the host application for the duration of the plugin handle.
|
protecteddefault |
|
protectedvirtualdefault |
|
pure virtual |
Initialises the backend immediately after the plugin instance is constructed.
| app_name | Calling application name; may inform log labels or file paths. |
true on success; false to indicate the plugin must not be used further.
|
pure virtual |
Writes a single record to the backend.
Implementations should be non-blocking; str remains valid only for the duration of the call.
| level | Severity using vlink::Logger::Level values. |
| str | Fully formatted record. |
true on success; false to indicate a write error.