Fixed issue #396 and added some tests to catch it

This commit is contained in:
gabime
2017-03-28 01:54:33 +03:00
parent 27df6eb4ca
commit 397d4866b3
6 changed files with 353 additions and 291 deletions

View File

@@ -58,11 +58,7 @@ public:
const std::string& name() const;
void set_pattern(const std::string&);
void set_formatter(formatter_ptr);
// error handler
void set_error_handler(log_err_handler);
log_err_handler error_handler();
// automatically call flush() if message level >= log_level
void flush_on(level::level_enum log_level);
@@ -70,6 +66,10 @@ public:
const std::vector<sink_ptr>& sinks() const;
// error handler
virtual void set_error_handler(log_err_handler);
virtual log_err_handler error_handler();
protected:
virtual void _sink_it(details::log_msg&);
virtual void _set_pattern(const std::string&);