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

Writer category interfaces and type traits kcenon. More...

#include <type_traits>
#include <cstdint>
Include dependency graph for writer_category.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

interface  kcenon::logger::sync_writer_tag
 Tag interface for synchronous writers. More...
 
interface  kcenon::logger::async_writer_tag
 Tag interface for asynchronous writers. More...
 
interface  kcenon::logger::decorator_writer_tag
 Tag interface for decorator writers. More...
 
interface  kcenon::logger::composite_writer_tag
 Tag interface for composite writers. More...
 
struct  kcenon::logger::is_sync_writer< T >
 Type trait to check if a writer is synchronous. More...
 
struct  kcenon::logger::is_async_writer< T >
 Type trait to check if a writer is asynchronous. More...
 
struct  kcenon::logger::is_decorator_writer< T >
 Type trait to check if a writer is a decorator. More...
 
struct  kcenon::logger::is_composite_writer< T >
 Type trait to check if a writer is composite. More...
 

Namespaces

namespace  kcenon
 
namespace  kcenon::logger
 

Concepts

concept  kcenon::logger::SyncWriter
 Concept for synchronous writers.
 
concept  kcenon::logger::AsyncWriter
 Concept for asynchronous writers.
 
concept  kcenon::logger::DecoratorWriter
 Concept for decorator writers.
 
concept  kcenon::logger::CompositeWriter
 Concept for composite writers.
 

Enumerations

enum class  kcenon::logger::writer_category : std::uint8_t { kcenon::logger::synchronous , kcenon::logger::asynchronous , kcenon::logger::decorator , kcenon::logger::composite }
 Categories of log writers based on operational behavior. More...
 

Functions

template<typename T >
constexpr writer_category kcenon::logger::get_writer_category ()
 Get the primary category of a writer type.
 
constexpr const char * kcenon::logger::to_string (writer_category cat) noexcept
 Get string representation of writer category.
 

Variables

template<typename T >
constexpr bool kcenon::logger::is_sync_writer_v = is_sync_writer<T>::value
 
template<typename T >
constexpr bool kcenon::logger::is_async_writer_v = is_async_writer<T>::value
 
template<typename T >
constexpr bool kcenon::logger::is_decorator_writer_v = is_decorator_writer<T>::value
 
template<typename T >
constexpr bool kcenon::logger::is_composite_writer_v = is_composite_writer<T>::value
 

Detailed Description

Writer category interfaces and type traits kcenon.

Since
1.4.0
Version
Phase 2.0 - Writer Hierarchy Clarification

This file defines interfaces and type traits for categorizing log writers based on their operational characteristics:

  • Synchronous Writers: Blocking I/O operations, immediate output
  • Asynchronous Writers: Non-blocking, queue-based background processing
  • Decorator Writers: Wrap other writers to add functionality
  • Composite Writers: Combine multiple formatters/sinks or writers

These categories help users understand writer behavior and make informed decisions about which writer to use for their needs.

Note
Writers can belong to multiple categories (e.g., a decorator that wraps an async writer is both a decorator and async).

Definition in file writer_category.h.