|
22 | 22 | #include <vix/log/LogContext.hpp> |
23 | 23 | #include <vix/log/LogFormat.hpp> |
24 | 24 | #include <vix/log/LogLevel.hpp> |
25 | | -#include <vix/utils/Logger.hpp> |
| 25 | +#include <vix/log/Logger.hpp> |
26 | 26 |
|
27 | 27 | namespace vix::log |
28 | 28 | { |
29 | 29 |
|
30 | 30 | /** |
31 | 31 | * @class LogAdapter |
32 | | - * @brief Public adapter that bridges `vix::log` to `vix::utils::Logger`. |
| 32 | + * @brief Public adapter over the canonical Vix logger implementation. |
33 | 33 | * |
34 | | - * This class does not implement logging itself. |
35 | | - * It provides a stable public API for the `vix::log` module while |
36 | | - * delegating the actual work to the existing utils logger backend. |
| 34 | + * This class provides the public `vix::log` API while delegating to the |
| 35 | + * logging implementation owned by this module. |
37 | 36 | */ |
38 | 37 | class LogAdapter |
39 | 38 | { |
@@ -172,55 +171,55 @@ namespace vix::log |
172 | 171 | template <typename... Args> |
173 | 172 | void log(LogLevel level, fmt::format_string<Args...> fmtstr, Args &&...args) |
174 | 173 | { |
175 | | - backend().log(to_utils_level(level), fmtstr, std::forward<Args>(args)...); |
| 174 | + backend().log(to_logger_level(level), fmtstr, std::forward<Args>(args)...); |
176 | 175 | } |
177 | 176 |
|
178 | 177 | /** |
179 | 178 | * @brief Log a formatted message with key/value pairs. |
180 | 179 | * |
181 | | - * This delegates to `vix::utils::Logger::logf`. |
| 180 | + * This delegates to the canonical logger implementation. |
182 | 181 | */ |
183 | 182 | template <typename... Args> |
184 | 183 | void logf(LogLevel level, const std::string &message, Args &&...kvpairs) |
185 | 184 | { |
186 | | - backend().logf(to_utils_level(level), message, std::forward<Args>(kvpairs)...); |
| 185 | + backend().logf(to_logger_level(level), message, std::forward<Args>(kvpairs)...); |
187 | 186 | } |
188 | 187 |
|
189 | 188 | private: |
190 | 189 | /** |
191 | | - * @brief Access the underlying utils logger backend. |
| 190 | + * @brief Access the underlying logger implementation. |
192 | 191 | */ |
193 | | - [[nodiscard]] static vix::utils::Logger &backend(); |
| 192 | + [[nodiscard]] static Logger &backend(); |
194 | 193 |
|
195 | 194 | /** |
196 | | - * @brief Convert a public log level to utils logger level. |
| 195 | + * @brief Convert a public log level to implementation level. |
197 | 196 | */ |
198 | | - [[nodiscard]] static vix::utils::Logger::Level to_utils_level(LogLevel level) noexcept; |
| 197 | + [[nodiscard]] static Logger::Level to_logger_level(LogLevel level) noexcept; |
199 | 198 |
|
200 | 199 | /** |
201 | | - * @brief Convert a utils logger level to public log level. |
| 200 | + * @brief Convert an implementation level to public log level. |
202 | 201 | */ |
203 | | - [[nodiscard]] static LogLevel from_utils_level(vix::utils::Logger::Level level) noexcept; |
| 202 | + [[nodiscard]] static LogLevel from_logger_level(Logger::Level level) noexcept; |
204 | 203 |
|
205 | 204 | /** |
206 | | - * @brief Convert a public log format to utils logger format. |
| 205 | + * @brief Convert a public log format to implementation format. |
207 | 206 | */ |
208 | | - [[nodiscard]] static vix::utils::Logger::Format to_utils_format(LogFormat format) noexcept; |
| 207 | + [[nodiscard]] static Logger::Format to_logger_format(LogFormat format) noexcept; |
209 | 208 |
|
210 | 209 | /** |
211 | | - * @brief Convert a utils logger format to public log format. |
| 210 | + * @brief Convert an implementation format to public log format. |
212 | 211 | */ |
213 | | - [[nodiscard]] static LogFormat from_utils_format(vix::utils::Logger::Format format) noexcept; |
| 212 | + [[nodiscard]] static LogFormat from_logger_format(Logger::Format format) noexcept; |
214 | 213 |
|
215 | 214 | /** |
216 | | - * @brief Convert a public log context to utils logger context. |
| 215 | + * @brief Convert a public log context to implementation context. |
217 | 216 | */ |
218 | | - [[nodiscard]] static vix::utils::Logger::Context to_utils_context(const LogContext &ctx); |
| 217 | + [[nodiscard]] static Logger::Context to_logger_context(const LogContext &ctx); |
219 | 218 |
|
220 | 219 | /** |
221 | | - * @brief Convert a utils logger context to public log context. |
| 220 | + * @brief Convert an implementation context to public log context. |
222 | 221 | */ |
223 | | - [[nodiscard]] static LogContext from_utils_context(const vix::utils::Logger::Context &ctx); |
| 222 | + [[nodiscard]] static LogContext from_logger_context(const Logger::Context &ctx); |
224 | 223 | }; |
225 | 224 |
|
226 | 225 | } // namespace vix::log |
|
0 commit comments