#include "logger.hpp" #include #include #include #include void zos_log(const char* fmt, ...) { va_list args; va_start(args, fmt); char buf[1024] = {0}; vsnprintf(buf, sizeof(buf), fmt, args); qInfo() << buf; va_end(args); } int32_t zos_get_ticket() { return (int32_t)QDateTime::currentMSecsSinceEpoch(); } std::string zhex2str(const uint8_t* hex, size_t len) { std::string str; for (size_t i = 0; i < len; i++) { char buf[3] = {0}; snprintf(buf, sizeof(buf), "%02x ", hex[i]); str += buf; } return str; }