Merge pull request #2375 from kslattery/bugfix/default_file_event_handlers

Add default file-event_handler callbacks. #2374
This commit is contained in:
Gabi Melman 2022-05-13 10:58:55 +03:00 committed by GitHub
commit e05b8542a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -306,6 +306,13 @@ struct source_loc
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, std::FILE *file_stream)> after_open;
std::function<void(const filename_t &filename, std::FILE *file_stream)> before_close;