feat: add DEBUG-level logging to all Library public methods#3026
Open
claygeo wants to merge 1 commit into
Open
feat: add DEBUG-level logging to all Library public methods#3026claygeo wants to merge 1 commit into
claygeo wants to merge 1 commit into
Conversation
Replace unused Python standard logging with arcticdb.log.version
logger and add log.debug() calls at the entry of all 40 public
methods in the Library class, including batch variants.
Uses {} placeholder format for zero-overhead when DEBUG is inactive
(the _Logger.log() guard skips string formatting entirely).
Closes man-group#1106
Signed-Off By: Clayton George <claygeorg@gmail.com>. By including this sign-off line I agree to the terms of the Contributor License Agreement.
Collaborator
|
Looks good to me, could you rebase and check if any new |
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.
Summary
loggingimport witharcticdb.log.versionloggerlog.debug()at the entry of all 40 public Library methods, including batch variantslogger = logging.getLogger(__name__)that was never usedMotivation
Addresses #1106. A previous PR (#2972) was closed because it used Python's standard
logginginstead of the project's internalarcticdb.logsystem, and didn't cover all API methods including batch ones.This PR fixes both issues:
from arcticdb.log import version as log(same pattern as_store.py)write_batch,read_batch,append_batch,update_batch,delete_batch,read_metadata_batch,write_metadata_batch,get_description_batchLog format
Uses
{}placeholder format (not f-strings) so string formatting is skipped entirely when DEBUG level is inactive, via theis_active()guard in_Logger.log().Single-symbol methods log the symbol name and key parameters:
Batch methods log the count:
Changes
python/arcticdb/version_store/library.pyCloses #1106