mirror of
https://github.com/gabime/spdlog.git
synced 2025-01-26 23:49:03 +08:00
Update README.md
This commit is contained in:
parent
39cdd08a54
commit
bdbe908693
@ -192,11 +192,11 @@ void user_defined_example()
|
||||
//
|
||||
void err_handler_example()
|
||||
{
|
||||
//can be set globaly or per logger (logger->set_error_handler(..))
|
||||
|
||||
spdlog::set_error_handler([](const std::string& msg) {
|
||||
std::cerr << "my err handler: " << msg << std::endl;
|
||||
});
|
||||
spd::get("console")->info("some invalid message to trigger an error {}{}{}{}", 3);
|
||||
});
|
||||
// (or logger->set_error_handler(..) to set for specific logger)
|
||||
}
|
||||
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user