|
Database System 0.1.0
Advanced C++20 Database System with Multi-Backend Support
|
Centralized logging utility for database backends. More...
#include <backend_logger.h>

Public Member Functions | |
| backend_logger (std::string_view backend_name) | |
| Construct a logger for a specific backend. | |
| void | error (std::string_view context, std::string_view message) const |
| Log an error message with context. | |
| void | warning (std::string_view message) const |
| Log a warning message. | |
| void | info (std::string_view message) const |
| Log an info message. | |
Private Attributes | |
| std::string | backend_name_ |
Centralized logging utility for database backends.
This class provides a unified logging interface that replaces the duplicate *_LOG_ERROR, *_LOG_WARNING, and *_LOG_INFO macros previously defined in each backend implementation.
Usage:
Definition at line 52 of file backend_logger.h.
|
inlineexplicit |
Construct a logger for a specific backend.
| backend_name | Name of the backend (e.g., "PostgreSQL", "SQLite") |
Definition at line 59 of file backend_logger.h.
|
inline |
Log an error message with context.
| context | The operation context (e.g., "initialize", "execute_query") |
| message | The error message |
Definition at line 69 of file backend_logger.h.
References backend_name_.
|
inline |
Log an info message.
| message | The info message |
Definition at line 98 of file backend_logger.h.
References backend_name_.
|
inline |
Log a warning message.
| message | The warning message |
Definition at line 84 of file backend_logger.h.
References backend_name_.
|
private |
Definition at line 109 of file backend_logger.h.