From 1fb94571016a41d7ea6ae49a9f61deb5149a6fa4 Mon Sep 17 00:00:00 2001 From: Charlie Vigue Date: Thu, 3 Oct 2024 02:05:40 +0000 Subject: [PATCH] Logger: Make the logger more const friendly. This change fixes no issues but it does enable the fixing of several issues and should eliminate issues going forward. Signed-off-by: Charlie Vigue --- openvpn/log/logger.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/openvpn/log/logger.hpp b/openvpn/log/logger.hpp index 44a0c9e0..130b8c85 100644 --- a/openvpn/log/logger.hpp +++ b/openvpn/log/logger.hpp @@ -87,7 +87,7 @@ class Logger * @param msg the message to print */ template - void log(T &&msg) + void log(T &&msg) const { /* this ensures that the function is empty if MAX_LEVEL excludes this level */ if constexpr (max_log_level >= LEVEL) @@ -103,7 +103,7 @@ class Logger * @param msg the message to print */ template - void log_trace(T &&msg) + void log_trace(T &&msg) const { log(std::forward(msg)); } @@ -114,7 +114,7 @@ class Logger * @param msg the message to print */ template - void log_debug(T &&msg) + void log_debug(T &&msg) const { log(std::forward(msg)); } @@ -125,7 +125,7 @@ class Logger * @param msg the message to print */ template - void log_info(T &&msg) + void log_info(T &&msg) const { log(std::forward(msg)); } @@ -135,7 +135,7 @@ class Logger * @param msg the message to log */ template - void log_verbose(T &&msg) + void log_verbose(T &&msg) const { log(std::forward(msg)); } @@ -145,7 +145,7 @@ class Logger * @param msg the message to log */ template - void log_error(T &&msg) + void log_error(T &&msg) const { log(std::forward(msg)); }