|
spdlog
|
Definition at line 29 of file mongo_sink.h.
#include <mongo_sink.h>
Public Member Functions | |
| mongo_sink (const std::string &db_name, const std::string &collection_name, const std::string &uri="mongodb://localhost:27017") | |
| ~mongo_sink () | |
| void | log (const details::log_msg &msg) final |
| void | flush () final |
| void | set_pattern (const std::string &pattern) final |
| void | set_formatter (std::unique_ptr< spdlog::formatter > sink_formatter) final |
| void | set_level (level::level_enum log_level) |
| level::level_enum | level () const |
| bool | should_log (level::level_enum msg_level) const |
Protected Member Functions | |
| void | sink_it_ (const details::log_msg &msg) override |
| void | flush_ () override |
| virtual void | set_pattern_ (const std::string &pattern) |
| virtual void | set_formatter_ (std::unique_ptr< spdlog::formatter > sink_formatter) |
Protected Attributes | |
| std::unique_ptr< spdlog::formatter > | formatter_ |
| Mutex | mutex_ |
| level_t | level_ {level::trace} |
Private Attributes | |
| std::string | db_name_ |
| std::string | coll_name_ |
| std::unique_ptr< mongocxx::client > | client_ = nullptr |
Static Private Attributes | |
| static mongocxx::instance | instance_ {} |
|
inline |
Definition at line 32 of file mongo_sink.h.
|
inline |
Definition at line 46 of file mongo_sink.h.
|
finalvirtualinherited |
Implements spdlog::sinks::sink.
Definition at line 33 of file base_sink-inl.h.
|
inlineoverrideprotectedvirtual |
Implements spdlog::sinks::base_sink< Mutex >.
Definition at line 67 of file mongo_sink.h.
|
inherited |
Definition at line 22 of file sink-inl.h.
|
finalvirtualinherited |
Implements spdlog::sinks::sink.
Definition at line 26 of file base_sink-inl.h.
|
finalvirtualinherited |
Implements spdlog::sinks::sink.
Definition at line 47 of file base_sink-inl.h.
|
protectedvirtualinherited |
Reimplemented in spdlog::sinks::dist_sink< Mutex >.
Definition at line 60 of file base_sink-inl.h.
|
inherited |
Definition at line 17 of file sink-inl.h.
|
finalvirtualinherited |
Implements spdlog::sinks::sink.
Definition at line 40 of file base_sink-inl.h.
|
protectedvirtualinherited |
Reimplemented in spdlog::sinks::dist_sink< Mutex >.
Definition at line 54 of file base_sink-inl.h.
|
inherited |
Definition at line 12 of file sink-inl.h.
|
inlineoverrideprotectedvirtual |
Implements spdlog::sinks::base_sink< Mutex >.
Definition at line 52 of file mongo_sink.h.
|
private |
Definition at line 73 of file mongo_sink.h.
|
private |
Definition at line 72 of file mongo_sink.h.
|
private |
Definition at line 71 of file mongo_sink.h.
|
protectedinherited |
Definition at line 39 of file base_sink.h.
|
staticprivate |
Definition at line 70 of file mongo_sink.h.
|
protectedinherited |
|
mutableprotectedinherited |
Definition at line 40 of file base_sink.h.