Repository navigation
[MP][Refactor] Move logging to common - #6781
Open
thegoldenflow wants to merge 1 commit into
Open
thegoldenflow wants to merge 1 commit into
thegoldenflow wants to merge 1 commit into
Conversation
Move lmcache/logging.py to lmcache/v1/common/logging.py and update every reference: imports, docs, the zh_CN catalog, examples and notebooks. Client and server code both create their loggers with init_logger, and the module only needs the standard library (OpenTelemetry is optional). The file itself is unchanged and the old path is not re-exported. isort moves the import line in 73 files; nothing else changes. examples/token_dropping/snapkv_colab.ipynb keeps the old import because it installs a fork that only has lmcache/logging.py. Signed-off-by: Jason Yao <wsyjh8@gmail.com>
thegoldenflow
marked this pull request as ready for review
November 20, 2026 01:42
thegoldenflow
requested review from
ApostaC,
DongDongJu,
KuntaiDu,
Shaoting-Feng,
VincyZhang,
YaoJiayi,
andyluo7,
chunxiaozheng,
deng451e,
hickeyma,
hlin99,
maobaolong,
ruizhang0101,
sammshen,
yoo-kumaneko and
zhengfeihe
as code owners
November 20, 2026 01:42
This was referenced Nov 20, 2026
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.
What this PR does / why we need it:
Part of #6758.
Moves
lmcache/logging.pytolmcache/v1/common/logging.pyunchanged (a 100% rename) and switches every reference to the new path: 256 modules, 4 tests, 2 example scripts, 8 notebooks, 4 docs including the zh_CN.po, and 2.claude/skillsfiles. 277 files, +277/−277.import lmcache, the client, the server and the CLI all create their loggers withinit_logger, and the module only needs the standard library. The old path is not kept.Outside users of the old path
LMCache/LMCache_inprocess(141 files) andLMCache/lmcache_l2_plugins(autumn/adapter.py:34): I'll send matching changes.LMCache/LMCache-Ascend(47 files): I'll open an issue with the list.rannnayy/LMCache@get-query-tensor-v2, whichsnapkv_colab.ipynbinstalls, needs a rebase before that notebook runs again.lmcache.loggingimport (2026-11-20 01:20 UTC). Git shows no conflict, so each needs a one-line change per file when it mergesdev.init_loggerfromlmcache.utils, which still works.If you'd rather keep the old path for a release, a two-line re-export in
lmcache/logging.pywould do, as #6485 did forMemoryLayoutDesc.Special notes for your reviewers:
AI-assisted change; the submitter reviews every line before this leaves draft.
Every changed line only swaps
lmcache.loggingforlmcache.v1.common.logging;isortmoved the line in 73 files. Same asdev: the backend registry in both import orders,pytest --collect-only tests(9081 IDs), andpyteston 317 test files (4906 passed, 266 skipped, per test ID).pre-commitpasses. On a clean exportimport lmcache.loggingraisesModuleNotFoundError, andimport loggingstill returns the standard library. The runtime checks ran on the first commit; the second only changes one line insnapkv_colab.ipynb.#6763 changes the import block next to this one in 17 files; whichever lands second rebases. For #6582:
lmcache.loggingcan leave the client wheel's temporary list.AI-generated PR explainer (required when AI-generated code is included):
pr-explainer-ffc3ba1b.html
If applicable:
Before marking ready for review
agent-assisted changes.
or compatibility concerns.
Signed-off-bytrailer.bilingual HTML explainer all match the current head.
diagrams, optional motion, code walkthrough, and test rationale match the implementation.