mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Disable reload for log config.
This commit is contained in:
parent
cb6a4d0143
commit
e05535267b
11 changed files with 6 additions and 368 deletions
|
|
@ -198,73 +198,6 @@ void SrsFileLog::error(const char* tag, SrsContextId context_id, const char* fmt
|
|||
write_log(fd, log_data, size, SrsLogLevelError);
|
||||
}
|
||||
|
||||
srs_error_t SrsFileLog::on_reload_utc_time()
|
||||
{
|
||||
utc = _srs_config->get_utc_time();
|
||||
|
||||
return srs_success;
|
||||
}
|
||||
|
||||
srs_error_t SrsFileLog::on_reload_log_tank()
|
||||
{
|
||||
srs_error_t err = srs_success;
|
||||
|
||||
if (!_srs_config) {
|
||||
return err;
|
||||
}
|
||||
|
||||
bool tank = log_to_file_tank;
|
||||
log_to_file_tank = _srs_config->get_log_tank_file();
|
||||
|
||||
if (tank) {
|
||||
return err;
|
||||
}
|
||||
|
||||
if (!log_to_file_tank) {
|
||||
return err;
|
||||
}
|
||||
|
||||
if (fd > 0) {
|
||||
::close(fd);
|
||||
}
|
||||
open_log_file();
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
srs_error_t SrsFileLog::on_reload_log_level()
|
||||
{
|
||||
srs_error_t err = srs_success;
|
||||
|
||||
if (!_srs_config) {
|
||||
return err;
|
||||
}
|
||||
|
||||
level = srs_get_log_level(_srs_config->get_log_level());
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
srs_error_t SrsFileLog::on_reload_log_file()
|
||||
{
|
||||
srs_error_t err = srs_success;
|
||||
|
||||
if (!_srs_config) {
|
||||
return err;
|
||||
}
|
||||
|
||||
if (!log_to_file_tank) {
|
||||
return err;
|
||||
}
|
||||
|
||||
if (fd > 0) {
|
||||
::close(fd);
|
||||
}
|
||||
open_log_file();
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
void SrsFileLog::write_log(int& fd, char *str_log, int size, int level)
|
||||
{
|
||||
// ensure the tail and EOF of string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue