# tmuxp.log.TmuxpLoggerAdapter

- **Module:** tmuxp.log
- **Package:** tmuxp
- **Language:** Python
- **Kind:** class
- **Source:** https://github.com/tmux-python/tmuxp/blob/153acdf6ff1268b14d3d03ed488f545a7123c8f1/src/tmuxp/log.py#L27
- **Bases:** [`logging.LoggerAdapter`](https://docs.python.org/3/library/logging.html#logging.LoggerAdapter)
- **Page:** https://libtmux.org/en/py/stable/workspace/reference/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

```python
>>> 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

### Other members

- [`process`](/en/py/stable/workspace/reference/tmuxp-log-tmuxploggeradapter-process/) (method): Merge extra dictionary on Python < 3.13.
