Repository navigation
Releases: affromero/klogr
Releases · affromero/klogr
Release list
klogr 0.2.0 — to_file, timed, kv
Four new ergonomic helpers on LoggingRich. No breaking changes.
New
with logger.to_file("run.log"):— mirror logs to a file for the duration of a block, auto-restored on exit.with logger.timed("train epoch"):— entry + exit + elapsed, notime.perf_counter()boilerplate.logger.kv(epoch=12, lr=3e-4, loss=0.21)— one-line structured key=value logging.logger.exception("msg")documented (already existed) — error + Rich traceback.
Install
uv add klogr # or: pip install --upgrade klogrSee CHANGELOG.md for full notes.
klogr 0.1.6
Highlights
- One-line dual output:
logger.enable_dual_output("run.log")mirrors every log line to both the Rich console and a file — perfect for batch jobs and CI runs.
Install / upgrade
```bash
uv add klogr
or
pip install --upgrade klogr
```
What changed since 0.1.3 (rename release)
- 0.1.4 — loosened sha256sum>=2022.6.11 so uv resolves on macOS.
- 0.1.5 — added LICENSE.md so the wheel ships the license text.
- 0.1.6 — README + Why-use-it now document enable_dual_output().
Full notes: CHANGELOG.md.
klogr 0.1.5
First release of klogr with a proper LICENSE file in the source tree.
Highlights so far (since fork from difflogtest)
- Renamed:
difflogtest→klogr(PyPI blocked the shorterklog). - Scope shrunk: dropped the snapshot-test framework (
UnitTests,@register_unittest,LogReplacement,is_unittest_mode,run-unittestsCLI). Usepytestdirectly. - Layout flattened: top-level
logger.py,cache.py,time.py, pluspath/subpackage split intoops/io/query/env. - Dependencies trimmed: dropped
GitPython,tyro,pytz,json5,torch,torchvision,wget. Runtime deps now:rich,pydantic,python-dotenv,beartype,jaxtyping,natsort,sha256sum. - README polished: badges, ASCII overview, runnable
examples/. - PyPI ready: MIT license (SPDX), full classifiers + URLs metadata.
What you get
from klogr import get_logger
logger = get_logger()
logger.info("loaded %d samples", 1024) # auto file:line prefix
logger.success("training converged") # green checkPlus @lru_cache with a disable hook, path_join / path_exists / path_mkdir that handle local and s3:// paths transparently, and get_elapsed_time(seconds) for human-readable durations.
Install
uv add klogr
# or
pip install klogrSee CHANGELOG.md for the full 0.1.x history.
v0.0.1
Full Changelog: https://github.com/affromero/DiffLogTest/commits/v0.0.1