Skip to content

feat: add DEBUG-level logging to all Library public methods#3026

Open
claygeo wants to merge 1 commit into
man-group:masterfrom
claygeo:feat/library-debug-logging
Open

feat: add DEBUG-level logging to all Library public methods#3026
claygeo wants to merge 1 commit into
man-group:masterfrom
claygeo:feat/library-debug-logging

Conversation

@claygeo
Copy link
Copy Markdown

@claygeo claygeo commented Apr 10, 2026

Summary

  • Replace unused Python logging import with arcticdb.log.version logger
  • Add log.debug() at the entry of all 40 public Library methods, including batch variants
  • Remove dead logger = logging.getLogger(__name__) that was never used

Motivation

Addresses #1106. A previous PR (#2972) was closed because it used Python's standard logging instead of the project's internal arcticdb.log system, and didn't cover all API methods including batch ones.

This PR fixes both issues:

  • Uses from arcticdb.log import version as log (same pattern as _store.py)
  • Covers every public method including write_batch, read_batch, append_batch, update_batch, delete_batch, read_metadata_batch, write_metadata_batch, get_description_batch

Log format

Uses {} placeholder format (not f-strings) so string formatting is skipped entirely when DEBUG level is inactive, via the is_active() guard in _Logger.log().

Single-symbol methods log the symbol name and key parameters:

Writing symbol=my_data, staged=False, prune_previous_versions=False
Reading symbol=my_data, as_of=None, date_range=None, columns=None, lazy=False

Batch methods log the count:

Writing batch of 5 symbols
Reading batch of 10 symbols, lazy=False

Changes

  • 1 file changed: python/arcticdb/version_store/library.py
  • 41 insertions, 2 deletions

Closes #1106

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.
@poodlewars
Copy link
Copy Markdown
Collaborator

Looks good to me, could you rebase and check if any new library.py methods have been added since you raised this?

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.

Consistent logging of modification/read operations

2 participants