#include <async_logger.hpp>
Public Member Functions | |
| void | log_block (const std::string &msg) |
| void | flush () |
| void | stop () |
Static Public Member Functions | |
| static AsyncLogger & | instance () |
Private Member Functions | |
| AsyncLogger () | |
| ~AsyncLogger () | |
Static Private Member Functions | |
| static std::string | timestamp () |
Private Attributes | |
| std::thread | worker_ |
| std::queue< std::string > | queue_ |
| std::mutex | mtx_ |
| std::condition_variable | cv_ |
| std::string | log_path_ |
| std::atomic< bool > | stop_ {false} |
Definition at line 33 of file async_logger.hpp.
|
inlineprivate |
Definition at line 67 of file async_logger.hpp.
References cv_, log_path_, mtx_, queue_, stop_, and worker_.
Referenced by instance().
|
inlineprivate |
Definition at line 107 of file async_logger.hpp.
References stop().
|
inline |
|
inlinestatic |
|
inline |
Definition at line 40 of file async_logger.hpp.
References cv_, mtx_, queue_, stop_, and timestamp().
|
inline |
Definition at line 56 of file async_logger.hpp.
References cv_, stop_, and worker_.
Referenced by ~AsyncLogger().
|
inlinestaticprivate |
Definition at line 111 of file async_logger.hpp.
Referenced by log_block().
|
private |
Definition at line 125 of file async_logger.hpp.
Referenced by AsyncLogger(), flush(), log_block(), and stop().
|
private |
Definition at line 126 of file async_logger.hpp.
Referenced by AsyncLogger().
|
private |
Definition at line 124 of file async_logger.hpp.
Referenced by AsyncLogger(), flush(), and log_block().
|
private |
Definition at line 123 of file async_logger.hpp.
Referenced by AsyncLogger(), and log_block().
|
private |
Definition at line 127 of file async_logger.hpp.
Referenced by AsyncLogger(), log_block(), and stop().
|
private |
Definition at line 122 of file async_logger.hpp.
Referenced by AsyncLogger(), and stop().