mirror of
https://github.com/gabime/spdlog.git
synced 2025-10-02 11:29:01 +08:00
Gabime/visibilty-hidden 2.x (#3324)
Set CMAKE_CXX_VISIBILITY_PRESET and VISIBILITY_INLINES_HIDDEN when build shared lib
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
#include <utility>
|
||||
|
||||
// null, no cost dummy "mutex" and dummy "atomic" log level
|
||||
|
||||
namespace spdlog {
|
||||
namespace details {
|
||||
struct null_mutex {
|
||||
|
@@ -70,14 +70,16 @@ public:
|
||||
static constexpr std::string_view bold_on_red = "\033[1m\033[41m";
|
||||
|
||||
private:
|
||||
void sink_it_(const details::log_msg &msg) override;
|
||||
void flush_() override;
|
||||
FILE *target_file_;
|
||||
bool should_do_colors_;
|
||||
std::array<std::string, levels_count> colors_;
|
||||
void print_ccode_(const string_view_t color_code);
|
||||
void print_range_(const memory_buf_t &formatted, size_t start, size_t end);
|
||||
static std::string to_string_(const string_view_t sv);
|
||||
|
||||
void sink_it_(const details::log_msg &msg) override;
|
||||
void flush_() override;
|
||||
void set_color_mode_(color_mode mode);
|
||||
void print_ccode_(string_view_t color_code) const;
|
||||
void print_range_(const memory_buf_t &formatted, size_t start, size_t end) const;
|
||||
static std::string to_string_(string_view_t sv);
|
||||
};
|
||||
|
||||
template <typename Mutex>
|
||||
|
@@ -36,7 +36,7 @@ public:
|
||||
protected:
|
||||
// sink formatter
|
||||
std::unique_ptr<spdlog::formatter> formatter_;
|
||||
Mutex mutex_;
|
||||
mutable Mutex mutex_;
|
||||
|
||||
virtual void sink_it_(const details::log_msg &msg) = 0;
|
||||
virtual void flush_() = 0;
|
||||
|
Reference in New Issue
Block a user