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

Fix xrootd log level mapping bug and inherit from Pelican log level #1988

Merged
merged 6 commits into from
Feb 10, 2025

Conversation

jhiemstrawisc
Copy link
Member

This carries two fixes -- the first is for providing an xrootd log level that previously didn't have a definition, e.g. Logging.Origin.Http: trace. The new code should handle mapping that down if able, and up a level if needed

The new code also uses Pelican's configured Logging.Level as the default for the other xrootd values. This lets us crank up logging all at once without having to toggle each directive individually, while still allowing for individual overrides if so desired.

…og level

This carries two fixes -- the first is for providing an xrootd log level
that previously didn't have a definition, e.g. Logging.Origin.Http: trace.
The new code should handle mapping that down if able, and up a level if needed

The new code also uses Pelican's configured Logging.Level as the default for
the other xrootd values. This lets us crank up logging all at once without
having to toggle each directive individually, while still allowing for
individual overrides if so desired.
@jhiemstrawisc jhiemstrawisc added bug Something isn't working enhancement New feature or request cache Issue relating to the cache component origin Issue relating to the origin component configuration labels Feb 5, 2025
@jhiemstrawisc jhiemstrawisc added this to the v7.14 milestone Feb 5, 2025
@Saartank
Copy link
Collaborator

Saartank commented Feb 6, 2025

One problem I see is that because the default initialization is outside SetServerDefaults (in config/config.go), it is not being picked up the pelican config commands. Do you think it would be a good idea to move the default initialization code into SetServerDefaults?

Sarthak pointed out my previous approach prevented the defaults from showing
up in the dumped config JSON and through the config tool. This now sets
default values in `config/config.go` such that the configured values populate
in these locations.

NOTE: This results in the _configured_ values showing up, but when a certain
xrootd log param is undefined, it still maps up/down to the next best level.
However, I don't think that's something the user needs to know about.
Copy link
Collaborator

@Saartank Saartank left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for the changes.

@Saartank Saartank merged commit 0b7f96f into PelicanPlatform:main Feb 10, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cache Issue relating to the cache component configuration enhancement New feature or request origin Issue relating to the origin component
Projects
None yet
2 participants