Workspace ManagerstableAPI Reference

Choose documentation 3

stable

Current version

stable
English

Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

tmuxp.log.TmuxpLoggerAdapter

class tmuxp.log.TmuxpLoggerAdapter

LoggerAdapter that merges extra dictionary on Python < 3.13.

Description#

Follows the portable pattern to avoid repeating the same extra on every call while preserving the ability to add per-call extra kwargs.

Examples#

>>> adapter = TmuxpLoggerAdapter(
... logging.getLogger("test"),
... {"tmux_session": "my-session"},
... )
>>> msg, kwargs = adapter.process("hello %s", {"extra": {"tmux_window": "editor"}})
>>> msg
'hello %s'
>>> kwargs["extra"]["tmux_session"]
'my-session'
>>> kwargs["extra"]["tmux_window"]
'editor'

Members

Merge extra dictionary on Python < 3.13.

Esc

Type to search.

Reference preview Open reference