-
-
Notifications
You must be signed in to change notification settings - Fork 217
Open
Labels
Description
This issue pertains to this segment of main.cc: https://github.com/robotastic/trunk-recorder/blob/b3036159b513d1a0bbe3c456b23c1ed4f93df5c4/trunk-recorder/main.cc#L167-L174
The addition of a toggled global option within the config file to make logging friendly to logrotate syslog-styled logs. The option within the config.json would be a global option called syslogFriendly
as a boolean.
What would this request do exactly? If syslogFriendly
is set to true, a new function would be utilized within the segment of code above.
- The
file_name
directive would becometrunk-recorder.log
while respectingconfig.log_dir
andconfig.log_file
string and boolean respectively. - The log would have no date-time prefix due to # 1 (ex;
07-09-2023_0516_00.log
). - No built-in log rotation would occur. That would be on logrotate to truncate the current log file.
- TrunkRecorder must check for file existence when writing to
trunk-recorder.log
- as such,SIGHUP
or another signal would need to be used and captured on Trunk-Recorders' end.
This code addition would likely require the addition of text_file_backend::rotate_file()
from boost when a signal is utilized.