This repository has been archived on 2025-03-22. You can view files and clone it, but cannot push or open issues or pull requests.
travelguide/env/logging.cpp
2013-08-05 03:10:18 +03:00

20 lines
343 B
C++

#include "logging.hpp"
#include "../std/iostream.hpp"
namespace dbg
{
string ToString(LogPriority pr)
{
static char const * arr[] = { "DEBUG", "INFO", "WARNING", "ERROR" };
return arr[pr];
}
void Print(LogPriority pr, SourceAddress const & sa, string const & msg)
{
cout << ToString(pr) << " " << sa.ToString() << msg << endl;
}
}