pull/3355/head
LowLevelLore 6 months ago
parent 06b7a8a5f2
commit b2158d1eeb

@ -378,15 +378,8 @@ void replace_default_logger_example() {
spdlog::debug("This message should not be displayed!"); spdlog::debug("This message should not be displayed!");
spdlog::set_level(spdlog::level::trace); spdlog::set_level(spdlog::level::trace);
spdlog::debug("This message should be displayed.."); spdlog::debug("This message should be displayed..");
spdlog::set_default_logger(old_logger); spdlog::set_default_logger(old_logger);
} }
// Mapped Diagnostic Context (MDC) is a map that stores key-value pairs (string values) in thread
// local storage. Each thread maintains its own MDC, which loggers use to append diagnostic
// information to log outputs. Note: it is not supported in asynchronous mode due to its reliance on
// thread-local storage.
#ifndef SPDLOG_NO_TLS #ifndef SPDLOG_NO_TLS
#include "spdlog/mdc.h" #include "spdlog/mdc.h"
void mdc_example() { void mdc_example() {

@ -42,7 +42,6 @@ class tcp_client {
} }
public: public:
// Added timeout_ms parameter (in milliseconds)
void connect(const std::string &host, int port, int timeout_sec) { void connect(const std::string &host, int port, int timeout_sec) {
if (is_connected()) { if (is_connected()) {
close(); close();

Loading…
Cancel
Save