1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

support log rotate signal SIGUSR1. 3.0.8

This commit is contained in:
winlin 2016-12-08 18:23:22 +08:00
parent 9e9cad1826
commit 2955b1fd2d
9 changed files with 61 additions and 23 deletions

View file

@ -127,6 +127,19 @@ int SrsFastLog::initialize()
return ret;
}
void SrsFastLog::reopen()
{
if (fd > 0) {
::close(fd);
}
if (!log_to_file_tank) {
return;
}
open_log_file();
}
void SrsFastLog::verbose(const char* tag, int context_id, const char* fmt, ...)
{
if (_level > SrsLogLevel::Verbose) {