From cfdb99dc72fc4104eba9dffaf93d707d3780ca2a Mon Sep 17 00:00:00 2001 From: Robert Scheck Date: Fri, 26 Jul 2019 17:01:53 +0200 Subject: [PATCH 1/2] Append only to log files rather to override them (fixes #416) --- src/apps/common/ns_turn_utils.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/apps/common/ns_turn_utils.c b/src/apps/common/ns_turn_utils.c index 2c656d7..0792085 100644 --- a/src/apps/common/ns_turn_utils.c +++ b/src/apps/common/ns_turn_utils.c @@ -370,7 +370,7 @@ static void set_rtpfile(void) no_stdout_log = 1; } else { set_log_file_name(log_fn_base,log_fn); - _rtpfile = fopen(log_fn, "w"); + _rtpfile = fopen(log_fn, "a"); if(_rtpfile) TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO, "log file opened: %s\n", log_fn); } @@ -397,32 +397,32 @@ static void set_rtpfile(void) set_log_file_name(logbase, logf); - _rtpfile = fopen(logf, "w"); + _rtpfile = fopen(logf, "a"); if(_rtpfile) TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO, "log file opened: %s\n", logf); else { snprintf(logbase, FILE_STR_LEN, "/var/log/%s", logtail); set_log_file_name(logbase, logf); - _rtpfile = fopen(logf, "w"); + _rtpfile = fopen(logf, "a"); if(_rtpfile) TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO, "log file opened: %s\n", logf); else { snprintf(logbase, FILE_STR_LEN, "/var/tmp/%s", logtail); set_log_file_name(logbase, logf); - _rtpfile = fopen(logf, "w"); + _rtpfile = fopen(logf, "a"); if(_rtpfile) TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO, "log file opened: %s\n", logf); else { snprintf(logbase, FILE_STR_LEN, "/tmp/%s", logtail); set_log_file_name(logbase, logf); - _rtpfile = fopen(logf, "w"); + _rtpfile = fopen(logf, "a"); if(_rtpfile) TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO, "log file opened: %s\n", logf); else { snprintf(logbase, FILE_STR_LEN, "%s", logtail); set_log_file_name(logbase, logf); - _rtpfile = fopen(logf, "w"); + _rtpfile = fopen(logf, "a"); if(_rtpfile) TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO, "log file opened: %s\n", logf); else { From 1dab47ce565337481bda3f1bcdafc2036c981f74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9sz=C3=A1ros=20Mih=C3=A1ly?= Date: Tue, 22 Oct 2019 11:43:07 +0200 Subject: [PATCH 2/2] Add PR#417 --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 8375c39..d73322f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -30,6 +30,7 @@ Version 4.5.1.2 'dan Eider': - merge PR #284 Add bandwidth usage reporting packet/bandwidth usage by peers - merge PR #381 Modifying configure to enable compile with private libraries - merge PR #455 Typo corrected (by chanduthedev) + - merge PR #417 Append only to log files rather to override them (by robert-scheck) 02/03/2019 Oleg Moskalenko Mihály Mészáros Version 4.5.1.1 'dan Eider':