v1.1.4 : Added code quality check & fixed result.json fmt
This commit is contained in:
committed by
Brendan LE GLAUNEC
parent
1fc21f0906
commit
6e06346685
@@ -27,7 +27,6 @@ namespace tool {
|
||||
namespace encode {
|
||||
|
||||
std::string encode64(const std::string& str_to_encode);
|
||||
std::string decode64(const std::string& str_to_decode);
|
||||
|
||||
std::string base64_encode(unsigned char const*, unsigned int len);
|
||||
std::string base64_decode(std::string const& s);
|
||||
|
||||
@@ -14,14 +14,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "spdlog/spdlog.h"
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include "spdlog/spdlog.h"
|
||||
|
||||
namespace etix {
|
||||
|
||||
namespace tool {
|
||||
|
||||
enum class loglevel { DEBUG = 1, INFO = 2, WARN = 4, ERR = 5, CRITICAL = 6 };
|
||||
|
||||
inline std::string
|
||||
format_output(const std::string& from, const std::string& message) {
|
||||
auto ss = std::stringstream{};
|
||||
@@ -32,8 +34,6 @@ format_output(const std::string& from, const std::string& message) {
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
enum class loglevel { DEBUG = 1, INFO = 2, WARN = 4, ERR = 5, CRITICAL = 6 };
|
||||
|
||||
class logger {
|
||||
std::string name;
|
||||
std::shared_ptr<spdlog::logger> console;
|
||||
@@ -64,11 +64,6 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
std::string
|
||||
get_name() const {
|
||||
return this->name;
|
||||
}
|
||||
|
||||
static void
|
||||
info(const std::string& message) {
|
||||
etix::tool::logger::get_instance().console->info(message);
|
||||
@@ -84,11 +79,6 @@ public:
|
||||
etix::tool::logger::get_instance().console->error(message);
|
||||
}
|
||||
|
||||
static void
|
||||
crit(const std::string& message) {
|
||||
etix::tool::logger::get_instance().console->critical(message);
|
||||
}
|
||||
|
||||
static void
|
||||
debug(const std::string& message) {
|
||||
etix::tool::logger::get_instance().console->debug(message);
|
||||
@@ -111,6 +101,3 @@ public:
|
||||
#define LOG_INFO_(message, from) \
|
||||
etix::tool::logger::get_instance().info(etix::tool::format_output( \
|
||||
std::string(from) + "::" + __FUNCTION__ + ":" + std::to_string(__LINE__), message))
|
||||
#define LOG_CRIT_(message, from) \
|
||||
etix::tool::logger::get_instance().crit(etix::tool::format_output( \
|
||||
std::string(from) + "::" + __FUNCTION__ + ":" + std::to_string(__LINE__), message))
|
||||
|
||||
Reference in New Issue
Block a user