DUNE-DAQ / drunc

Dune RUN Control (DRUNC) is the run control for the DUNE experiment
1 stars 1 forks source link

Use the log_path from the confguration #284

Closed plasorak closed 4 weeks ago

plasorak commented 4 weeks ago

Requires https://github.com/DUNE-DAQ/confmodel/pull/51

This fixes: https://github.com/DUNE-DAQ/drunc/issues/257 and https://github.com/DUNE-DAQ/drunc/issues/200 (change the log file extension).

This uses the following logic:

  1. Applications will log to their log_path (defined in the Application schema).
  2. If above is not set, the applications will log to their Session's log_path.
  3. If above are not set, the applications will log to PWD.

In cases 1. and 2., the log will be non overwriting (i.e. they will have a timestamp assigned to them). In the case 3. overwriting logs is controlled by the boot's --override-logs/--no-override-logs switch.

Note that there is logic to check that the path exists if you are running on localhost: Say you configured your log_path to /bananas/cucumbers/potatoes, drunc will only be able to say whether this path exists (and therefore thrown a reasonable exception) if you are running on localhost.

There is no check if that path is writable, or if the disk has space.