Add logging in parts of API that don't have it yet#153
Open
JamesAnstey wants to merge 1 commit intomainfrom
Open
Add logging in parts of API that don't have it yet#153JamesAnstey wants to merge 1 commit intomainfrom
JamesAnstey wants to merge 1 commit intomainfrom
Conversation
sol1105
reviewed
Jul 11, 2025
Comment on lines
+52
to
+55
| config = dreqcfg.load_config() | ||
| change_log_file(logfile=config['log_file']) | ||
| change_log_level(level=config['log_level']) | ||
| logger = get_logger() |
Contributor
There was a problem hiding this comment.
@JamesAnstey Applying change_log_file and change_log_level to have the config values take effect is only used in export_dreq_lists_json.py and not in dreq_query? I also did not set this up for dreq_content.py. Would it be possible to have this run in utils/logger.py as default (@rigoudyg), so it is active whenever one uses logger=get_logger()? Else we would have to run this code in each function that uses the logger or place it at the top of each script I think.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addressing #120, adding logging to
dreq_query.pyand command-line functions that depend on it, using same approach as elsewhere in the software (data_request.py,dreq_content.py, etc).