mirror of
https://github.com/gabime/spdlog.git
synced 2025-01-26 15:39:03 +08:00
Added non const sinks() function to support addition/removal of sinks from existing logger
This commit is contained in:
parent
63db70aacc
commit
ddb3002bc1
@ -338,3 +338,8 @@ inline const std::vector<spdlog::sink_ptr> &spdlog::logger::sinks() const
|
|||||||
{
|
{
|
||||||
return sinks_;
|
return sinks_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline std::vector<spdlog::sink_ptr> &spdlog::logger::sinks()
|
||||||
|
{
|
||||||
|
return sinks_;
|
||||||
|
}
|
||||||
|
@ -126,6 +126,8 @@ public:
|
|||||||
|
|
||||||
const std::vector<sink_ptr> &sinks() const;
|
const std::vector<sink_ptr> &sinks() const;
|
||||||
|
|
||||||
|
std::vector<sink_ptr> &sinks() ;
|
||||||
|
|
||||||
// error handler
|
// error handler
|
||||||
void set_error_handler(log_err_handler err_handler);
|
void set_error_handler(log_err_handler err_handler);
|
||||||
log_err_handler error_handler();
|
log_err_handler error_handler();
|
||||||
|
Loading…
Reference in New Issue
Block a user