mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Server: Add callback for logrotate
This commit is contained in:
parent
fa1ccaa9f2
commit
2bc6632a22
2 changed files with 7 additions and 0 deletions
|
@ -1104,6 +1104,11 @@ void SrsServer::on_signal(int signo)
|
|||
#ifndef SRS_GPERF_MC
|
||||
if (signo == SRS_SIGNAL_REOPEN_LOG) {
|
||||
_srs_log->reopen();
|
||||
|
||||
if (handler) {
|
||||
handler->on_logrotate();
|
||||
}
|
||||
|
||||
srs_warn("reopen log file, signo=%d", signo);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue