Workspace Manager1.xAPI Reference

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

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'

Members1#

  • process method Merge extra dictionary on Python < 3.13.
Esc

Type to search.

Reference previewOpen reference