MOS Source Code
Loading...
Searching...
No Matches
SyslogStreamWriter Struct Reference

#include <syslog.hpp>

+ Inheritance diagram for SyslogStreamWriter:
+ Collaboration diagram for SyslogStreamWriter:

Public Member Functions

 ~SyslogStreamWriter ()
 
template<typename T>
requires std::is_integral_v<T>
SyslogStreamWriteroperator<< (T value)
 
template<typename T>
requires std::is_void_v<T>
SyslogStreamWriteroperator<< (T *ptr)
 
template<typename E>
requires (std::is_enum_v<E>)
SyslogStreamWriteroperator<< (E value)
 
SyslogStreamWriteroperator<< (char c)
 
SyslogStreamWriteroperator<< (const char *str)
 
SyslogStreamWriteroperator<< (mos::string_view sv)
 
template<typename M, typename... Args>
SyslogStreamWriter operator<< (const Preformatted< M, Args... > &fmt)
 

Static Public Member Functions

static SyslogStreamWriter NewStream (DebugFeature feature, LogLevel level, RCCore *rcCore, SyslogBuffer &buf)
 

Private Member Functions

 SyslogStreamWriter (DebugFeature feature, LogLevel level, RCCore *rcCore, SyslogBuffer &fmtbuffer)
 
- Private Member Functions inherited from RefCounted
 RefCounted (RCCore *rc_)
 
 RefCounted (const RefCounted &a)
 
 RefCounted (RefCounted &&a)
 
 ~RefCounted ()
 
RefCounted operator= (const RefCounted &a)=delete
 
RefCounted operator= (RefCounted &&a)=delete
 
size_t GetRef () const
 

Private Attributes

SyslogBufferfmtbuffer
 
size_t pos = 0
 
const u64 timestamp
 
const DebugFeature feature
 
const LogLevel level
 
const bool should_print
 

Detailed Description

Definition at line 40 of file syslog.hpp.

Constructor & Destructor Documentation

◆ ~SyslogStreamWriter()

Definition at line 105 of file syslog.cpp.

+ Here is the call graph for this function:

◆ SyslogStreamWriter()

SyslogStreamWriter ( DebugFeature feature,
LogLevel level,
RCCore * rcCore,
SyslogBuffer & fmtbuffer )
explicitprivate

Definition at line 86 of file syslog.cpp.

Referenced by NewStream(), operator<<(), operator<<(), operator<<(), operator<<(), operator<<(), operator<<(), and operator<<().

+ Here is the call graph for this function:

Member Function Documentation

◆ NewStream()

static SyslogStreamWriter NewStream ( DebugFeature feature,
LogLevel level,
RCCore * rcCore,
SyslogBuffer & buf )
inlinestatic

Definition at line 42 of file syslog.hpp.

Referenced by LoggingDescriptor< feature, level >::operator<<().

+ Here is the call graph for this function:

◆ operator<<() [1/7]

template<typename T>
requires std::is_integral_v<T>
SyslogStreamWriter & operator<< ( T value)
inline

Definition at line 50 of file syslog.hpp.

+ Here is the call graph for this function:

◆ operator<<() [2/7]

template<typename T>
requires std::is_void_v<T>
SyslogStreamWriter & operator<< ( T * ptr)
inline

Definition at line 60 of file syslog.hpp.

+ Here is the call graph for this function:

◆ operator<<() [3/7]

template<typename E>
requires (std::is_enum_v<E>)
SyslogStreamWriter & operator<< ( E value)
inline

Definition at line 70 of file syslog.hpp.

+ Here is the call graph for this function:

◆ operator<<() [4/7]

SyslogStreamWriter & operator<< ( char c)
inline

Definition at line 79 of file syslog.hpp.

+ Here is the call graph for this function:

◆ operator<<() [5/7]

SyslogStreamWriter & operator<< ( const char * str)
inline

Definition at line 88 of file syslog.hpp.

+ Here is the call graph for this function:

◆ operator<<() [6/7]

SyslogStreamWriter & operator<< ( mos::string_view sv)
inline

Definition at line 97 of file syslog.hpp.

+ Here is the call graph for this function:

◆ operator<<() [7/7]

template<typename M, typename... Args>
SyslogStreamWriter operator<< ( const Preformatted< M, Args... > & fmt)
inline

Definition at line 107 of file syslog.hpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ fmtbuffer

◆ pos

◆ timestamp

const u64 timestamp
private

Definition at line 121 of file syslog.hpp.

Referenced by SyslogStreamWriter().

◆ feature

const DebugFeature feature
private

Definition at line 122 of file syslog.hpp.

Referenced by NewStream(), and SyslogStreamWriter().

◆ level

const LogLevel level
private

Definition at line 123 of file syslog.hpp.

Referenced by NewStream(), SyslogStreamWriter(), and ~SyslogStreamWriter().

◆ should_print

const bool should_print
private

The documentation for this struct was generated from the following files: