time is now even more precise. added file, function, line macros

This commit is contained in:
UPSquared 2018-05-22 18:11:27 +03:00 committed by Stefan Andritoiu
parent 9d6944f9b8
commit 4ed5da0098

View File

@ -10,7 +10,9 @@
if ( log_level < UPM_LOGGER::LogLevel() ) \
; \
else \
UPM_LOGGER().log(log_level)
UPM_LOGGER().log(log_level) << __FILE__ << " " \
<< __FUNCTION__ << " " \
<< __LINE__ << ": "
namespace upm {
@ -70,10 +72,9 @@ namespace upm {
{
using namespace std::chrono;
os << "UPM - " << duration_cast<milliseconds>
os << "UPM - " << duration_cast<nanoseconds>
(system_clock::now().time_since_epoch()).count();
os << " " << getLogLevelName(level) << ": ";
os << std::string(level > LOG_DEBUG ? level - LOG_DEBUG : 0, '\t');
os << " " << getLogLevelName(level) << " ";
logLevel = level;