Toolbox snapshot
The Reactive C++ Toolbox
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
toolbox::sys::AsyncLogger Class Reference

#include <toolbox/sys/Logger.hpp>

Inheritance diagram for toolbox::sys::AsyncLogger:
Inheritance graph
[legend]
Collaboration diagram for toolbox::sys::AsyncLogger:
Collaboration graph
[legend]

Public Member Functions

 AsyncLogger (Logger &logger)
 
 ~AsyncLogger () override
 
 AsyncLogger (const AsyncLogger &)=delete
 
AsyncLoggeroperator= (const AsyncLogger &)=delete
 
 AsyncLogger (AsyncLogger &&)=delete
 
AsyncLoggeroperator= (AsyncLogger &&)=delete
 
bool run ()
 
void stop ()
 Interrupt and exit any inprogress call to run().
 
- Public Member Functions inherited from toolbox::sys::Logger
 Logger () noexcept=default
 
virtual ~Logger ()
 
 Logger (const Logger &) noexcept=default
 
Loggeroperator= (const Logger &) noexcept=default
 
 Logger (Logger &&) noexcept=default
 
Loggeroperator= (Logger &&) noexcept=default
 
void write_log (WallTime ts, LogLevel level, int tid, LogMsgPtr &&msg, std::size_t size) noexcept
 

Additional Inherited Members

Detailed Description

Definition at line 120 of file Logger.hpp.

Constructor & Destructor Documentation

◆ AsyncLogger() [1/3]

toolbox::sys::AsyncLogger::AsyncLogger ( Logger logger)
explicit

Definition at line 187 of file Logger.cpp.

◆ ~AsyncLogger()

toolbox::sys::AsyncLogger::~AsyncLogger ( )
override

Definition at line 192 of file Logger.cpp.

◆ AsyncLogger() [2/3]

toolbox::sys::AsyncLogger::AsyncLogger ( const AsyncLogger )
delete

◆ AsyncLogger() [3/3]

toolbox::sys::AsyncLogger::AsyncLogger ( AsyncLogger &&  )
delete

Member Function Documentation

◆ operator=() [1/2]

AsyncLogger & toolbox::sys::AsyncLogger::operator= ( const AsyncLogger )
delete

◆ operator=() [2/2]

AsyncLogger & toolbox::sys::AsyncLogger::operator= ( AsyncLogger &&  )
delete

◆ run()

bool toolbox::sys::AsyncLogger::run ( )

The run function waits for a log entry and then writes that log entry to the underlying logger. Returns false if the Logger was closed.

Definition at line 205 of file Logger.cpp.

◆ stop()

void toolbox::sys::AsyncLogger::stop ( )

Interrupt and exit any inprogress call to run().

Definition at line 213 of file Logger.cpp.


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