Merge branch 'append-logs'

This commit is contained in:
Mészáros Mihály 2019-10-22 12:07:25 +02:00
commit 577b0454dc
2 changed files with 7 additions and 6 deletions

View File

@ -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 <mom040267@gmail.com> Mihály Mészáros <misi@majd.eu>
Version 4.5.1.1 'dan Eider':

View File

@ -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 {