Files
http-server/src/logger.cpp

35 lines
475 B
C++

#include <cstdio>
#include "logger.hpp"
void Log(std::string const & label, std::string const & message)
{
std::printf("[%s] %s\n", label.c_str(), message.c_str());
}
void Logger::Success(const std::string & s)
{
Log("SUCCESS", s);
}
void Logger::Error(const std::string & s)
{
Log("ERROR", s);
}
void Logger::Info(const std::string & s)
{
Log("INFO", s);
}
void Logger::Debug(const std::string & s)
{
Log("DEBUG", s);
}
Logger::~Logger()
{
}
Logger::Logger()
{
}