bux API Reference 1.9.0
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 (const std::chrono::time_zone *tz_=nullptr)
 
 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.
 
template<typename F >
auto partitionBy (F f) -> C_NodeArrayProxy
 
- Public Member Functions inherited from bux::I_SyncLog

Friends

class C_NodeProxy
 

Additional Inherited Members

- Public Attributes inherited from bux::I_SyncLog
const std::chrono::time_zone *const tz
 
- Protected Member Functions inherited from bux::I_SyncLog
 I_SyncLog (const std::chrono::time_zone *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 ( const std::chrono::time_zone * tz_ = nullptr)
inlineexplicit

Definition at line 30 of file ParaLog.h.

◆ C_ParaLog() [2/2]

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

Definition at line 31 of file ParaLog.h.

Member Function Documentation

◆ addChild()

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

Definition at line 182 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 188 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() [1/2]

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

◆ partitionBy() [2/2]

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

Definition at line 194 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.

Friends And Related Symbol Documentation

◆ C_NodeProxy

friend class C_NodeProxy
friend

Definition at line 63 of file ParaLog.h.


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