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

Make default log level part of pelican config #236

Merged

Conversation

joereuss12
Copy link
Contributor

Sets the default log level to ErrorLevel within defaults.yaml. The user is now able to modify their config file and override the default to whatever log level they would like. In addition, the -d flag functionality should remain the same and override whatever config is set. Also found a problem in object_copy.go which this does not work if the binary is named stashcp, should work now. Fixed some noticed snake case variable names floating around too and decided to fix them.

cmd/root.go Outdated Show resolved Hide resolved
@bbockelm bbockelm added the enhancement New feature or request label Oct 14, 2023
@joereuss12 joereuss12 force-pushed the make-log-level-part-of-config-branch branch from a66c0cf to 8b3a0a8 Compare October 16, 2023 15:40
Copy link
Collaborator

@bbockelm bbockelm left a comment

Choose a reason for hiding this comment

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

NACK. This needs to be rebased to bring in only the relevant commits (and not include the 50MB executable).

@joereuss12 joereuss12 force-pushed the make-log-level-part-of-config-branch branch from 805c0fe to e827278 Compare October 17, 2023 14:53
@joereuss12
Copy link
Contributor Author

Okay, should be fixed with rebasing now and the commits look better. Still running into the issue I found yesterday about root.go not being able to read in defaults.yaml so working towards a fix now.

Copy link
Collaborator

@bbockelm bbockelm left a comment

Choose a reason for hiding this comment

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

A few more comments on the updates.

config/resources/defaults.yaml Outdated Show resolved Hide resolved
docs/parameters.yaml Outdated Show resolved Hide resolved
cmd/object_copy.go Outdated Show resolved Hide resolved
cmd/root.go Outdated Show resolved Hide resolved
@joereuss12 joereuss12 mentioned this pull request Oct 17, 2023
This commit should have fixed all the rebasing issues. Work towards pelican log level able to be set in config. The -d flag takes priority of all log level settings. Also, found some variable names that were still in snake case and changed them to camelcase. This PR did work not too long ago but is now running into issues. It seems that in root.go it cannot read defaults.yaml so the log level cannot be set in there. Working towards a fix.
Now that the configurations are cleaned up, can successfully add the log
level as part of config. This should work for all methods (pelican,
osdf, and stashcp). However, for stashcp, nothing happens for log levels
set in config and you must use the `-d` flag since it does not go
through root.
@joereuss12 joereuss12 force-pushed the make-log-level-part-of-config-branch branch from e827278 to 25150b0 Compare October 24, 2023 15:57
Copy link
Member

@jhiemstrawisc jhiemstrawisc left a comment

Choose a reason for hiding this comment

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

LGTM.

@joereuss12 joereuss12 requested a review from bbockelm October 24, 2023 21:23
@bbockelm bbockelm merged commit 74eb698 into PelicanPlatform:main Oct 25, 2023
6 checks passed
@joereuss12 joereuss12 linked an issue Dec 5, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make default log level of the Pelican client part of configuration.
3 participants