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

tmuxp.log.TmuxpLoggerAdapter

Python
  • Python
  • Ruby Unavailable
  • Lua Unavailable
  • TypeScript Unavailable
  • Rust Unavailable
  • Go Unavailable
  • Java Unavailable
  • .NET Unavailable
  • C++ Unavailable
  • Swift Unavailable

API reference · Markdown

class tmuxp.log.TmuxpLoggerAdapter
class [source]
class [source]
class tmuxp.log.TmuxpLoggerAdapter

LoggerAdapter that merges extra dictionary on Python < 3.13.

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

process

process ( self , msg : t.Any , kwargs : t.MutableMapping[str, t.Any] ) → tuple[t.Any, t.MutableMapping[str, t.Any]]
method [source]
method [source]
process

Merge extra dictionary on Python < 3.13.

Esc

Type to search.