Call closelog in syslog sink's destructor

This commit is contained in:
fooinha 2014-12-18 16:40:57 +00:00
parent 375b88c191
commit c44ca12d57

View File

@ -64,7 +64,9 @@ public:
::openlog(ident.c_str(), option, syslog_facility_from_name(facility)); ::openlog(ident.c_str(), option, syslog_facility_from_name(facility));
} }
virtual ~syslog_sink() = default; virtual ~syslog_sink() {
::closelog();
}
syslog_sink(const syslog_sink&) = delete; syslog_sink(const syslog_sink&) = delete;
syslog_sink& operator=(const syslog_sink&) = delete; syslog_sink& operator=(const syslog_sink&) = delete;