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::set_level(spdlog::level::trace);
spdlog::debug("This message should be displayed..");
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
#include "spdlog/mdc.h"
void mdc_example() {

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

@ -90,7 +90,7 @@ public:
}
// set TCP_NODELAY
int enable_flag = 1;
int enable_flag = 1;
::setsockopt(socket_, IPPROTO_TCP, TCP_NODELAY, reinterpret_cast<char *>(&enable_flag),
sizeof(enable_flag));

Loading…
Cancel
Save