mirror of
https://github.com/gabime/spdlog.git
synced 2025-01-15 17:27:57 +00:00
Compare commits
9 Commits
0f42744f5c
...
ea5e7182ab
Author | SHA1 | Date | |
---|---|---|---|
|
ea5e7182ab | ||
|
d38d53d9dd | ||
|
c9e094d9fc | ||
|
af75985ec6 | ||
|
4b7c05903b | ||
|
695912c7cf | ||
|
5c06306ccc | ||
|
d4fd17f64f | ||
|
76d94e69ae |
@ -3,6 +3,8 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
ENABLE_LANGUAGE(C)
|
||||
|
||||
#---------------------------------------------------------------------------------------
|
||||
# Start spdlog project
|
||||
#---------------------------------------------------------------------------------------
|
||||
|
@ -147,6 +147,7 @@ enum level_enum
|
||||
err = SPDLOG_LEVEL_ERROR,
|
||||
critical = SPDLOG_LEVEL_CRITICAL,
|
||||
off = SPDLOG_LEVEL_OFF,
|
||||
n_levels
|
||||
};
|
||||
|
||||
#if !defined(SPDLOG_LEVEL_NAMES)
|
||||
|
@ -111,7 +111,7 @@ SPDLOG_INLINE void ansicolor_sink<ConsoleMutex>::set_color_mode(color_mode mode)
|
||||
template<typename ConsoleMutex>
|
||||
SPDLOG_INLINE void ansicolor_sink<ConsoleMutex>::print_ccode_(const string_view_t &color_code)
|
||||
{
|
||||
fwrite(color_code.data(), sizeof(string_view_t::char_type), color_code.size(), target_file_);
|
||||
fwrite(color_code.data(), sizeof(char), color_code.size(), target_file_);
|
||||
}
|
||||
|
||||
template<typename ConsoleMutex>
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <array>
|
||||
|
||||
namespace spdlog {
|
||||
namespace sinks {
|
||||
@ -80,7 +80,7 @@ private:
|
||||
mutex_t &mutex_;
|
||||
bool should_do_colors_;
|
||||
std::unique_ptr<spdlog::formatter> formatter_;
|
||||
std::unordered_map<level::level_enum, string_view_t, level::level_hasher> colors_;
|
||||
std::array<string_view_t , level::n_levels> colors_;
|
||||
void print_ccode_(const string_view_t &color_code);
|
||||
void print_range_(const memory_buf_t &formatted, size_t start, size_t end);
|
||||
};
|
||||
|
@ -219,7 +219,7 @@ protected:
|
||||
using namespace internal;
|
||||
|
||||
memory_buf_t formatted;
|
||||
formatter_->format(msg, formatted);
|
||||
base_sink<Mutex>::formatter_->format(msg, formatted);
|
||||
formatted.push_back('\0');
|
||||
LPCSTR lp_str = static_cast<LPCSTR>(formatted.data());
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <array>
|
||||
#include <wincon.h>
|
||||
|
||||
namespace spdlog {
|
||||
@ -52,7 +52,7 @@ protected:
|
||||
bool in_console_;
|
||||
bool should_do_colors_;
|
||||
std::unique_ptr<spdlog::formatter> formatter_;
|
||||
std::unordered_map<level::level_enum, WORD, level::level_hasher> colors_;
|
||||
std::array<WORD , level::n_levels> colors_;
|
||||
|
||||
// set foreground color and return the orig console attributes (for resetting later)
|
||||
WORD set_foreground_color_(WORD attribs);
|
||||
|
@ -13,7 +13,7 @@ readability-*,\
|
||||
clang-analyzer-*'
|
||||
|
||||
WarningsAsErrors: ''
|
||||
HeaderFilterRegex: 'async.h|async_logger.h|common.h|details|formatter.h|logger.h|sinks|spdlog.h|tweakme.h|version.h'
|
||||
HeaderFilterRegex: 'include/spdlog/[^f].*'
|
||||
AnalyzeTemporaryDtors: false
|
||||
FormatStyle: none
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user