23 lines
364 B
C++
23 lines
364 B
C++
#include "logger.h"
|
|
#include <iostream>
|
|
#include <stdexcept>
|
|
|
|
logger ulog;
|
|
|
|
logger::logger()
|
|
{
|
|
}
|
|
|
|
void logger::log_internal(const char *s)
|
|
{
|
|
while (*s)
|
|
{
|
|
if (*s == '%' && *++s != '%')
|
|
throw std::runtime_error("invalid format string: missing arguments");
|
|
_logLine << *s++;
|
|
}
|
|
|
|
std::cout << _logLine.str() << std::endl;
|
|
}
|
|
|