working commit

This commit is contained in:
Олег Бородин
2026-05-05 11:37:10 +02:00
parent bd4df1e3da
commit eda9b8986b
62 changed files with 7546 additions and 476 deletions
+32
View File
@@ -0,0 +1,32 @@
#include <chrono>
#include <format>
#include <iostream>
#include <mutex>
#include <string>
#include <cstdio>
#include <cstdarg>
#include <uxlogger.hpp>
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<std::mutex> lock(mtx);
std::cout << std::format("{} {} {}\n", timenow, label, message);
}