mirror of
https://github.com/gabime/spdlog.git
synced 2025-10-01 19:09:03 +08:00
add file event handlers
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
#include <functional>
|
||||
#include <cstdio>
|
||||
|
||||
#ifdef SPDLOG_COMPILED_LIB
|
||||
# undef SPDLOG_HEADER_ONLY
|
||||
@@ -255,6 +256,13 @@ struct source_loc
|
||||
const char *funcname{nullptr};
|
||||
};
|
||||
|
||||
typedef struct
|
||||
{
|
||||
std::function<void(const filename_t &filename, std::FILE *file_stream)> after_open;
|
||||
std::function<void(const filename_t &filename, std::FILE *file_stream)> before_close;
|
||||
std::function<void(const filename_t &filename)> after_close;
|
||||
} file_event_handlers_t;
|
||||
|
||||
namespace details {
|
||||
// make_unique support for pre c++14
|
||||
|
||||
|
Reference in New Issue
Block a user