Implemented logging utilities

This commit is contained in:
Pablo Rodriguez
2025-07-28 08:29:53 -04:00
parent 9a38c557f0
commit 472d35497d
16 changed files with 138 additions and 26 deletions

View File

@@ -0,0 +1,24 @@
#pragma once
#include "ILogFacility.hpp"
#include <format>
namespace ugly {
class LogAlias {
public:
ILogFacility *mpLog;
template<typename ...Args>
LogAlias &operator()(std::format_string<Args...> format, Args &&...args) {
if(mpLog) {
mpLog->vlog(format.get(), std::make_format_args(args...));
}
return *this;
}
};
extern LogAlias log;
}