Add Start logs messages for `cta-frontend` in `/var/log/cta/cta-frontend.log`
Problem to solve
Sometimes the cta-frontend process is silently crashing and it is automatically silently restarted.
We need to better track these unwanted restarts that are only logged in the xrootd log file for now.
Intended users
Operations monitoring wild restarts of this key service.
Further details
We already spent quite some time on this for the tape server service and it would be good to reproduce the same for cta-frontend.
Basically:
- one message that specify the software version and command line arguments if possible (xrootd world may break this...)
- followed by 1 message per configuration entry that exposed defaults values and configuration values set in the configuration file
It is OK not to have everything in one go or discuss further if this is impractival, but the first message is really needed.
Proposal
[1631701324.970473000] Sep 15 12:22:04.970473 tpsrv304.cern.ch cta-taped: LVL="INFO" PID="9359" TID="9359" MSG="Starting cta-taped" version="4.1-1"
foreground="0" logToStdout="0" logToFile="0" logFilePath="" configFileLocation="/etc/cta/cta-taped.conf" helpRequested="0"
[1631701325.024488000] Sep 15 12:22:05.024488 tpsrv304.cern.ch cta-taped: LVL="INFO" PID="9359" TID="9359" MSG="Configuration entry" category="tape
d" key="DaemonUserName" value="cta" source="Compile time default"
[1631701325.024795000] Sep 15 12:22:05.024795 tpsrv304.cern.ch cta-taped: LVL="INFO" PID="9359" TID="9359" MSG="Configuration entry" category="tape
d" key="DaemonGroupName" value="tape" source="Compile time default"
[1631701325.025031000] Sep 15 12:22:05.025031 tpsrv304.cern.ch cta-taped: LVL="INFO" PID="9359" TID="9359" MSG="Configuration entry" category="tape
d" key="LogMask" value="INFO" source="/etc/cta/cta-taped.conf:24"
[1631701325.025270000] Sep 15 12:22:05.025270 tpsrv304.cern.ch cta-taped: LVL="INFO" PID="9359" TID="9359" MSG="Configuration entry" category="tape
d" key="TpConfigPath" value="/etc/cta/TPCONFIG" source="Compile time default"
[1631701325.025488000] Sep 15 12:22:05.025488 tpsrv304.cern.ch cta-taped: LVL="INFO" PID="9359" TID="9359" MSG="Configuration entry" category="tape
d" key="externalEncryptionKeyScript" value="/usr/local/bin/cta-get-encryption-key" source="/etc/cta/cta-taped.conf:16"
[1631701325.025711000] Sep 15 12:22:05.025711 tpsrv304.cern.ch cta-taped: LVL="INFO" PID="9359" TID="9359" MSG="Configuration entry" category="tape
d" key="BufferSizeBytes" value="5242880" source="Compile time default"
[1631701325.026362000] Sep 15 12:22:05.026362 tpsrv304.cern.ch cta-taped: LVL="INFO" PID="9359" TID="9359" MSG="Configuration entry" category="taped" key="BufferCount" value="5000" source="/etc/cta/cta-taped.conf:11"
...