25 lines
422 B
C++
25 lines
422 B
C++
#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;
|
|
|
|
}
|