#include #include #include #include #include #include #include #include UxLogger uxlogger; static std::mutex mtx; UxLogger::UxLogger(const std::string ilabel) { label = ilabel; } UxLogger::UxLogger(void) { label = "global"; } void UxLogger::Log(const std::string& message) { auto now = std::chrono::system_clock::now(); std::chrono::zoned_time localnow{std::chrono::current_zone(), now}; std::string timenow = std::format("{:%Y-%m-%dT%H:%M:%OS%Z}", localnow); std::lock_guard lock(mtx); std::cout << std::format("{} {} {}\n", timenow, label, message); }