Release Notes
1.3.0
Release date: 2026-08-10
Added
Timer— a wall-clock timer for instrumenting code blocks, usable as a context manager or explicitly:
```python with mollog.Timer("fetch"): # logs "fetch took 0.123s" at INFO do_work()
t = mollog.Timer("fetch", log=False).start() # silent stopwatch do_work() t.stop() print(t.elapsed) ```
Accepts log= to suppress logging, level= to pick the log level, and
logger_name= to route elsewhere (default "mollog.timer"). elapsed
reads live while running; running reports whether the timer is active.
Fixed
mollog.__version__reported"0+unknown"on every install. The distribution is published asmolcrafts-mollog, but the metadata lookup used the import namemollog, so it always raisedPackageNotFoundErrorand fell through to the placeholder. It now reports the real installed version.
Changed
- Documentation moved to docs.molcrafts.org/mollog.
The
Documentationproject URL, the README links, andsite_urlnow point there instead of at the GitHub tree. - Docs toolchain pins raised to
zensical>=0.0.53andmolcrafts-zensical-theme>=0.2.5.
Removed
CHANGELOG.md. Release history now lives in git tags / GitHub Releases, with user-facing highlights on this page. TheChangelogproject URL and theMANIFEST.inentry were dropped with it.
Breaking changes
None. All additions are backward compatible.
1.2.2
Release date: 2026-05-11
Completes the stdlib drop-in surface so import mollog as logging works.
Added
mollog.basicConfig(**kwargs)accepts stdlib'sfilename,filemode,format,datefmt,style,level,stream,handlers,force,encoding,errorskwargs with stdlib semantics (no-op when the root has handlers unlessforce=True; mutually exclusivestream/filename/handlers; only%-style format strings are accepted).mollog.getLogger(name=None)returns the root logger when called with no argument orNone, otherwise delegates toget_logger.LoggergainssetLevel,addHandler,removeHandler,isEnabledForaliases for the existing snake_case methods, plushasHandlers(),getEffectiveLevel(), andgetChild(suffix)with stdlib semantics.- Level constants
NOTSET,WARN,FATALre-exported at the top level.
Changed
- Top-level level constants (
DEBUG,INFO,WARNING,ERROR,CRITICAL, …) are now the plain-intobjects from stdliblogging, somollog.WARNING is logging.WARNING.TRACEremains mollog's superset addition (still a plainint).
Breaking changes
None. All additions are backward compatible.
1.2.1
Release date: 2026-05-10
Performance
- Tightened hot paths in
_formatter.py,_manager.py, and_stdlib_bridge.py: root-logger helpers no longer acquire a lock on every call once the manager has been configured, and stdlib records without user fields short-circuit to a shared empty dict. No public API or behavior changes.
1.2.0
Release date: 2026-05-10
Stdlib-logging bridge plus stdlib-style top-level API so projects can drop import logging entirely.
Added
mollog.configure(format=...)accepts stdlib%(asctime)s-style format strings (anddatefmt=), rendered through the newStdlibStyleFormatter.mollog.configure(capture_stdlib=True)— default — installs aStdlibBridgeHandleron stdlib's root logger so third-party libraries that emit throughloggingflow through mollog's hierarchy. Disable withcapture_stdlib=False.Logger.set_level()acceptsLevel | str | int, and propagates tologging.getLogger(name).setLevel(...)so noisy libraries are silenced at the source.- Top-level helpers on the root logger:
mollog.trace,mollog.debug,mollog.info,mollog.warning,mollog.error,mollog.critical,mollog.exception,mollog.set_level. - Stdlib-compatible level constants:
mollog.TRACE,DEBUG,INFO,WARNING,ERROR,CRITICAL. - New public surface:
StdlibBridgeHandler,StdlibStyleFormatter,capture_stdlib_logging,release_stdlib_logging.
Changed
LoggerManager.shutdown()and_reset()also tear down any installed stdlib bridges.
Breaking changes
None. All additions are backward compatible.
1.1.0
Release date: 2026-04-18
Added
configure(filename=...)now wires up both aStreamHandler(terminal) and aFileHandlerin one call, withfilemode,file_level,file_formatter, andencodingkwargs.- Pydantic Logfire integration:
LogfireHandler,configure_logfire(...),Logger.fire(...). - New
Contextnamespace replaces the function-based context API;Context.scope(name, **attrs)doubles as a logfire span. RichFormatter(replaces the previousRichHandlershape).- Underscore-prefixed internal modules (
_formatter,_handler,_logger, …) — public API is unchanged from prior versions where the export still exists.
Changed
- Promoted
richfrom an optional extra to a required runtime dependency.
1.0.0
Release date: 2026-04-12
First stable release.
What's included
- Thread-safe logger and manager operations
configure()andshutdown()helpers for application lifecycle- Structured
extrafields andbind()for reusable logger context - Context-local fields via
contextvars:bind_context(),scoped_context(),reset_context() - Exception and stack capture:
exc_info=,stack_info=,logger.exception(...) TextFormatterandJSONFormatterStreamHandler,FileHandler,RotatingFileHandler,TimedRotatingFileHandler,QueueHandler,NullHandlerQueueListenerwith drain window on shutdown- Optional
RichHandlerbehindmolcrafts-mollog[rich]
Breaking changes
None — this is the initial stable release.