#pragma once #include "ILogFacility.hpp" #include namespace ugly { /** * \brief Provides \c std::format -style variadic template functions for \ref ILogFacility. */ class LogAlias { public: ILogFacility *mpLog; template LogAlias &operator()(std::format_string fmt, Args &&...args) { if(mpLog) { mpLog->vlog(fmt.get(), std::make_format_args(args...)); } return *this; } }; /** * \brief Globally-shared log. * * Should be assigned to by the user, defaults to a null log. */ extern LogAlias log; }