mirror of
https://github.com/gabime/spdlog.git
synced 2025-01-25 06:59:11 +08:00
Merge pull request #2375 from kslattery/bugfix/default_file_event_handlers
Add default file-event_handler callbacks. #2374
This commit is contained in:
commit
e05b8542a0
@ -306,6 +306,13 @@ struct source_loc
|
|||||||
|
|
||||||
struct file_event_handlers
|
struct file_event_handlers
|
||||||
{
|
{
|
||||||
|
file_event_handlers()
|
||||||
|
: before_open([](spdlog::filename_t) {})
|
||||||
|
, after_open ([](spdlog::filename_t, std::FILE*) {})
|
||||||
|
, before_close([](spdlog::filename_t, std::FILE*) {})
|
||||||
|
, after_close([](spdlog::filename_t) {})
|
||||||
|
{}
|
||||||
|
|
||||||
std::function<void(const filename_t &filename)> before_open;
|
std::function<void(const filename_t &filename)> before_open;
|
||||||
std::function<void(const filename_t &filename, std::FILE *file_stream)> after_open;
|
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, std::FILE *file_stream)> before_close;
|
||||||
|
Loading…
Reference in New Issue
Block a user