bux API Reference
1.11.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
src
SyncLog.cpp
Go to the documentation of this file.
1
#include "
SyncLog.h
"
2
#include <ostream>
// std::ostream
3
4
namespace
bux
{
5
6
//
7
// Implement Classes
8
//
9
std::ostream *
C_SyncLogger::lockLog
()
14
{
15
m_lock.lock();
16
if
(
const
auto
ret = m_impl.useLog()) [[likely]]
17
return
ret;
18
19
m_lock.unlock();
20
return
nullptr
;
21
}
22
23
std::ostream *
C_SyncLogger::lockLog
(
E_LogLevel
ll)
29
{
30
m_lock.lock();
31
if
(
const
auto
ret = m_impl.useLog(ll)) [[likely]]
32
return
ret;
33
34
m_lock.unlock();
35
return
nullptr
;
36
}
37
38
void
C_SyncLogger::unlockLog
(
bool
flush)
43
{
44
m_impl.unuseLog(flush);
45
m_lock.unlock();
46
}
47
48
}
// namespace bux
SyncLog.h
bux::C_SyncLogger::lockLog
std::ostream * lockLog() override
Definition
SyncLog.cpp:9
bux::C_SyncLogger::unlockLog
void unlockLog(bool flush) override
Definition
SyncLog.cpp:38
bux
THE common namespace of bux library.
Definition
AtomiX.cpp:3
bux::E_LogLevel
E_LogLevel
Definition
LogLevel.h:9
Generated by
1.13.2