bux API Reference 1.12.5
Static library of whatever are seen required in general purpose but not directly supported from Modern C++. Or whatever reusable originated from my side projects.
Loading...
Searching...
No Matches
bux::C_ParaLog Class Reference

#include <ParaLog.h>

Inheritance diagram for bux::C_ParaLog:

Classes

class  C_NodeArrayProxy
class  C_NodeProxy

Public Member Functions

 C_ParaLog (T_LocalZone tz_=T_LocalZone())
 C_ParaLog (bool use_local_time)
template<class... T_Args>
bool addChild (T_Args &&...args)
template<class C_LogImpl, class C_Holder = typename C_AutoSinkHolderT<C_LogImpl>::type, class... T_Args>
bool addChildT (std::function< void(C_LogImpl &)> post_ctor={}, E_LogLevel ll=LL_VERBOSE, T_Args &&...args)
template<typename F>
C_NodeArrayProxy partitionBy (F f)
std::ostream * lockLog () override
 Return non-null pointer if possible.
std::ostream * lockLog (E_LogLevel ll) override
 Return non-null pointer if logging is permitted for the given log level ll.
void unlockLog (bool flush) override
 If the previous call to lockLog() returned null, the behavior is undefined.

Friends

class C_NodeProxy

Additional Inherited Members

Public Attributes inherited from bux::I_SyncLog
const T_LocalZone tz
Protected Member Functions inherited from bux::I_SyncLog
 I_SyncLog (T_LocalZone tz_)
 ~I_SyncLog ()=default
 Pointer deletion is not expected.

Detailed Description

Thread-safe file log which can be configured to automatically change the output path according to the current timestamp. Apply bux::C_UseOstream to block any other thread WITHIN process from using it.

Definition at line 17 of file ParaLog.h.

Constructor & Destructor Documentation

◆ C_ParaLog() [1/2]

bux::C_ParaLog::C_ParaLog ( T_LocalZone tz_ = T_LocalZone())
inlineexplicit

Definition at line 30 of file ParaLog.h.

References bux::I_SyncLog::I_SyncLog().

Referenced by C_ParaLog().

Here is the caller graph for this function:

◆ C_ParaLog() [2/2]

bux::C_ParaLog::C_ParaLog ( bool use_local_time)
inlineexplicit

Definition at line 32 of file ParaLog.h.

References C_ParaLog(), and bux::local_zone().

Member Function Documentation

◆ addChild()

template<class... T_Args>
bool bux::C_ParaLog::addChild ( T_Args &&... args)

Definition at line 184 of file ParaLog.h.

References bux::C_ParaLog::C_NodeProxy::addChild().

◆ addChildT()

template<class C_LogImpl, class C_Holder, class... T_Args>
bool bux::C_ParaLog::addChildT ( std::function< void(C_LogImpl &)> post_ctor = {},
E_LogLevel ll = LL_VERBOSE,
T_Args &&... args )

Definition at line 190 of file ParaLog.h.

References bux::C_ParaLog::C_NodeProxy::addChildT().

◆ lockLog() [1/2]

std::ostream * bux::C_ParaLog::lockLog ( )
overridevirtual

Return non-null pointer if possible.

Implements bux::I_SyncLog.

Definition at line 94 of file ParaLog.cpp.

References lockLog().

Referenced by lockLog(), and lockLog().

Here is the caller graph for this function:

◆ lockLog() [2/2]

std::ostream * bux::C_ParaLog::lockLog ( E_LogLevel ll)
overridevirtual

Return non-null pointer if logging is permitted for the given log level ll.

Implements bux::I_SyncLog.

Definition at line 99 of file ParaLog.cpp.

References lockLog().

◆ partitionBy()

template<typename F>
auto bux::C_ParaLog::partitionBy ( F f) -> C_NodeArrayProxy
nodiscard

Definition at line 196 of file ParaLog.h.

References bux::C_ParaLog::C_NodeProxy::partitionBy().

◆ unlockLog()

void bux::C_ParaLog::unlockLog ( bool flush)
overridevirtual

If the previous call to lockLog() returned null, the behavior is undefined.

Implements bux::I_SyncLog.

Definition at line 104 of file ParaLog.cpp.

◆ C_NodeProxy

friend class C_NodeProxy
friend

Definition at line 65 of file ParaLog.h.


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