CppTrail
Loading...
Searching...
No Matches
sync_logger.h File Reference

Synchronous logger implementation base. More...

#include <mutex>
#include "cpptrail/base_logger.h"
Include dependency graph for sync_logger.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CppTrail::BasicSyncLoggerImpl< char_t >
 A synchronous, thread-safe logger implementation template. This class ensures that every log call is processed immediately on the calling thread. Access to the 'work' function is protected by a mutex, making it safe for multi-threaded environments, though it may introduce latency in the calling thread. More...
 

Namespaces

namespace  CppTrail
 Root namespace for the CppTrail logging library.
 

Typedefs

Logger Type Aliases

Standardized aliases for common character encodings.

using CppTrail::SyncLoggerImpl = BasicSyncLoggerImpl< char >
 Standard char-based logger (ASCII/UTF-8).
 
using CppTrail::wSyncLoggerImpl = BasicSyncLoggerImpl< wchar_t >
 Wide-character logger (Platform dependent, typically UTF-16 on Windows).
 
using CppTrail::u8SyncLoggerImpl = BasicSyncLoggerImpl< char8_t >
 Explicit UTF-8 logger using C++20 char8_t.
 
using CppTrail::u16SyncLoggerImpl = BasicSyncLoggerImpl< char16_t >
 UTF-16 logger using char16_t.
 
using CppTrail::u32SyncLoggerImpl = BasicSyncLoggerImpl< char32_t >
 UTF-32 logger using char32_t.
 

Detailed Description

Synchronous logger implementation base.

Defines the BasicSyncLoggerImpl template, which provides a thread-safe, mutex-protected foundation for loggers that execute I/O operations directly on the calling thread.

Author
Dante Doménech Martínez