Logger System 0.1.3
High-performance C++20 thread-safe logging system with asynchronous capabilities
Loading...
Searching...
No Matches
network_writer.cpp File Reference

Network writer implementation with jthread compatibility. More...

#include <kcenon/logger/writers/network_writer.h>
#include <kcenon/logger/utils/error_handling_utils.h>
#include <kcenon/logger/utils/string_utils.h>
#include "../async/jthread_compat.h"
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <unistd.h>
#include <cerrno>
#include <cstring>
#include <functional>
#include <iomanip>
#include <sstream>
#include <thread>
Include dependency graph for network_writer.cpp:

Go to the source code of this file.

Classes

class  kcenon::logger::network_send_jthread_worker
 Worker thread for sending buffered logs with jthread compatibility. More...
 
class  kcenon::logger::network_reconnect_jthread_worker
 Worker thread for reconnection attempts with jthread compatibility. More...
 

Namespaces

namespace  kcenon
 
namespace  kcenon::logger
 

Detailed Description

Network writer implementation with jthread compatibility.

Since
1.3.0 - Refactored to use jthread compatibility layer

This implementation uses C++20 std::jthread with std::stop_token for cooperative cancellation where available, with fallback to std::thread for environments without jthread support (e.g., libc++).

Definition in file network_writer.cpp.