Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the log_path from the confguration #284

Merged
merged 3 commits into from
Oct 25, 2024

Conversation

plasorak
Copy link
Collaborator

@plasorak plasorak commented Oct 24, 2024

Requires DUNE-DAQ/confmodel#51

This fixes: #257 and #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.

Copy link
Contributor

@PawelPlesniak PawelPlesniak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@PawelPlesniak PawelPlesniak merged commit 2a64311 into develop Oct 25, 2024
@PawelPlesniak PawelPlesniak deleted the plasorak/configurable-log-paths branch October 25, 2024 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Configurable log files location
2 participants