log: forward logging arguments
This commit is contained in:
parent
60b65a9a24
commit
f644c5dec4
@ -17,6 +17,7 @@
|
|||||||
#include "./debug.hpp"
|
#include "./debug.hpp"
|
||||||
|
|
||||||
#include "./except.hpp"
|
#include "./except.hpp"
|
||||||
|
#include "./log.hpp"
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
|
2
log.hpp
2
log.hpp
@ -62,7 +62,7 @@ namespace util {
|
|||||||
void log (level_t, const std::string &msg);
|
void log (level_t, const std::string &msg);
|
||||||
|
|
||||||
template <typename ...tail>
|
template <typename ...tail>
|
||||||
void log (level_t, const std::string &format, tail ..._tail);
|
void log (level_t, const std::string &format, tail&& ..._tail);
|
||||||
|
|
||||||
|
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
|
2
log.ipp
2
log.ipp
@ -26,7 +26,7 @@
|
|||||||
namespace util {
|
namespace util {
|
||||||
template <typename ...tail>
|
template <typename ...tail>
|
||||||
void
|
void
|
||||||
log (level_t l, const std::string &format, tail ..._tail)
|
log (level_t l, const std::string &format, tail&& ..._tail)
|
||||||
{
|
{
|
||||||
log (l, format::render (format, std::forward<tail> (_tail)...));
|
log (l, format::render (format, std::forward<tail> (_tail)...));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user