Skip to content

Commit 14e37b9

Browse files
committed
Fix test logger
1 parent eec4e44 commit 14e37b9

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

main/test/tests.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,11 @@ namespace {
1212

1313
class Logger : public oatpp::base::Logger {
1414
private:
15-
oatpp::concurrency::SpinLock::Atom m_atom;
15+
oatpp::concurrency::SpinLock m_lock;
1616
public:
1717

18-
Logger()
19-
: m_atom(false)
20-
{}
21-
2218
void log(v_int32 priority, const std::string& tag, const std::string& message) override {
23-
oatpp::concurrency::SpinLock lock(m_atom);
19+
std::lock_guard<oatpp::concurrency::SpinLock> lock(m_lock);
2420
std::cout << tag << ":" << message << "\n";
2521
}
2622

0 commit comments

Comments
 (0)