Skip to content

Add logfile variables to xml to be handed to DaqMonitor

Dylan Oliver Teague requested to merge feature/optional_monitor_logs into develop

Description

As suggested by @lpetre, the logging for the monitoring code is now added to the xml with the ability to turn it on and off (doWriteLog), change where the logs are saved (logPath), and number of updates before writing the logs (logUpdateInterval). There are default values for all of these, (the default being no log files), so not including these tags in the xml for running the xdaq won't stop the code.

Currently, the logs are saved in different files for each AMC. A quality of life increase might be creating a folder for each Shelf and run and putting the logs into those folders to make things a bit cleaner (eg shelf1_Y-m-d_run#/amc#_H:M:S.gz) and maybe event further bifurcation of subfolders for each amc (eg shelf1_Y-m-d_run#/amc#/H:M:S.gz). This can hopefully be discussed more in this MR.

Related Issue

Closes #99 (closed)

How Has This Been Tested?

Ran the code in my area and reproduces the logs as intended.

The default value is set to /var/log/gemdaq/, but since only certain people has write access, that's probably why this wan't caught earlier (all the logs are made by Misha and Laurent and I never created logs when it pointed to /var/log/gemdaq). Because of this, we might want to change the default write directory.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
Edited by Laurent Petre

Merge request reports