22 lines
No EOL
434 B
C++
22 lines
No EOL
434 B
C++
#include "log.hpp"
|
|
|
|
#include <chrono>
|
|
#include <iostream>
|
|
|
|
|
|
namespace atlas::script::module::debug {
|
|
|
|
void log(const std::string& category, const std::string& message) {
|
|
// get the current time
|
|
auto now = std::chrono::system_clock::now();
|
|
|
|
// display it into the standard output
|
|
std::cout << std::format(
|
|
"[{:%Y-%m-%dT%H:%M:%S}] ({}) {}",
|
|
now,
|
|
category,
|
|
message
|
|
) << std::endl;
|
|
}
|
|
|
|
} |