From ca291b65739a175869396d45831e29c80dea9ede Mon Sep 17 00:00:00 2001 From: georgemoralis Date: Sun, 13 Aug 2023 16:46:59 +0300 Subject: [PATCH] remove log for renaming to lowercase --- src/Util/Log.cpp | 17 ------------ src/Util/Log.h | 70 ------------------------------------------------ 2 files changed, 87 deletions(-) delete mode 100644 src/Util/Log.cpp delete mode 100644 src/Util/Log.h diff --git a/src/Util/Log.cpp b/src/Util/Log.cpp deleted file mode 100644 index 995f5892..00000000 --- a/src/Util/Log.cpp +++ /dev/null @@ -1,17 +0,0 @@ -#include -#include -#include - - - -namespace logging { - std::vector sinks; - - int init(bool use_stdout) { - sinks.clear();//clear existing sinks - if (use_stdout)//if we use stdout window then init it as well - sinks.push_back(std::make_shared()); - - return 0;//all ok - } -} \ No newline at end of file diff --git a/src/Util/Log.h b/src/Util/Log.h deleted file mode 100644 index d825a324..00000000 --- a/src/Util/Log.h +++ /dev/null @@ -1,70 +0,0 @@ -#pragma once - -#include - -namespace logging { - -#define LOG_TRACE SPDLOG_TRACE -#define LOG_DEBUG SPDLOG_DEBUG -#define LOG_INFO SPDLOG_INFO -#define LOG_WARN SPDLOG_WARN -#define LOG_ERROR SPDLOG_ERROR -#define LOG_CRITICAL SPDLOG_CRITICAL - -#define LOG_TRACE_IF(flag, ...) \ - if (flag) LOG_TRACE(__VA_ARGS__) -#define LOG_DEBUG_IF(flag, ...) \ - if (flag) LOG_DEBUG(__VA_ARGS__) -#define LOG_INFO_IF(flag, ...) \ - if (flag) LOG_INFO(__VA_ARGS__) -#define LOG_WARN_IF(flag, ...) \ - if (flag) LOG_WARN(__VA_ARGS__) -#define LOG_ERROR_IF(flag, ...) \ - if (flag) LOG_ERROR(__VA_ARGS__) -#define LOG_CRITICAL_IF(flag, ...) \ - if (flag) LOG_CRITICAL(__VA_ARGS__) - -int init(bool use_stdout); -} // namespace logging - -// copyright vita3k emu https://github.com/Vita3K/Vita3K/blob/master/vita3k/util/include/util/log.h -/* - returns: A string with the input number formatted in hexadecimal - Examples: - * `12` returns: `"0xC"` - * `1337` returns: `"0x539"` - * `72742069` returns: `"0x455F4B5"` -*/ -template -std::string log_hex(T val) { - using unsigned_type = typename std::make_unsigned::type; - std::stringstream ss; - ss << "0x"; - ss << std::hex << static_cast(val); - return ss.str(); -} - -/* - returns: A string with the input number formatted in hexadecimal with padding of the inputted type size - Examples: - * `uint8_t 5` returns: `"0x05"` - * `uint8_t 15` returns: `"0x0F"` - * `uint8_t 255` returns: `"0xFF"` - - * `uint16_t 15` returns: `"0x000F"` - * `uint16_t 1337` returns: `"0x0539"` - * `uint16_t 65535` returns: `"0xFFFF"` - - - * `uint32_t 15` returns: `"0x0000000F"` - * `uint32_t 1337` returns: `"0x00000539"` - * `uint32_t 65535` returns: `"0x0000FFFF"` - * `uint32_t 134217728` returns: `"0x08000000"` -*/ -template -std::string log_hex_full(T val) { - std::stringstream ss; - ss << "0x"; - ss << std::setfill('0') << std::setw(sizeof(T) * 2) << std::hex << val; - return ss.str(); -}