% cd pymodbus/examples
% python3 -m venv .venv
% source .venv/bin/activate
(.venv) % python3 server_async.py --log debug
2026-03-11 22:31:18,206 DEBUG transport:265 Awaiting connections server_listener
2026-03-11 22:31:18,209 INFO base:89 Server listening.
2026-03-11 22:31:28,529 DEBUG transport:287 Connected to server
2026-03-11 22:31:28,630 DEBUG transport:339 recv: 0x0 0x1 0x0 0x0 0x0 0x6 0x1 0x1 0x0 0x20 0x0 0x1 extra data:
2026-03-11 22:31:28,630 DEBUG base:72 Processing: 0x0 0x1 0x0 0x0 0x0 0x6 0x1 0x1 0x0 0x20 0x0 0x1
2026-03-11 22:31:28,631 DEBUG decoders:77 decoded PDU function_code(1 sub -1) -> ReadCoilsRequest(dev_id=0, transaction_id=0, address=32, count=1, bits=[], registers=[], status=1, retries=0)
2026-03-11 22:31:28,631 DEBUG transport:393 send: 0x0 0x1 0x0 0x0 0x0 0x4 0x1 0x1 0x1 0x1
2026-03-11 22:31:28,631 DEBUG transport:339 recv: 0x0 0x2 0x0 0x0 0x0 0x6 0x1 0x3 0x0 0x4 0x0 0x2 extra data:
2026-03-11 22:31:28,631 DEBUG base:72 Processing: 0x0 0x2 0x0 0x0 0x0 0x6 0x1 0x3 0x0 0x4 0x0 0x2
2026-03-11 22:31:28,631 DEBUG decoders:77 decoded PDU function_code(3 sub -1) -> ReadHoldingRegistersRequest(dev_id=0, transaction_id=0, address=4, count=2, bits=[], registers=[], status=1, retries=0)
2026-03-11 22:31:28,632 DEBUG transport:393 send: 0x0 0x2 0x0 0x0 0x0 0x7 0x1 0x3 0x4 0x0 0x11 0x0 0x11
2026-03-11 22:31:28,632 DEBUG transport:356 -> transport: received eof
2026-03-11 22:31:28,632 DEBUG transport:299 Connection lost server due to None
2026-03-11 22:31:28,632 DEBUG requesthandler:49 Handler for stream [server] has been canceled
(.venv) % python3 client_async.py --log debug
2026-03-11 22:31:28,528 DEBUG base:56 Connecting to 127.0.0.1:5020.
2026-03-11 22:31:28,528 DEBUG transport:251 Connecting comm
2026-03-11 22:31:28,529 DEBUG transport:287 Connected to comm
2026-03-11 22:31:28,630 DEBUG transport:393 send: 0x0 0x1 0x0 0x0 0x0 0x6 0x1 0x1 0x0 0x20 0x0 0x1
2026-03-11 22:31:28,631 DEBUG transport:339 recv: 0x0 0x1 0x0 0x0 0x0 0x4 0x1 0x1 0x1 0x1 extra data:
2026-03-11 22:31:28,631 DEBUG base:72 Processing: 0x0 0x1 0x0 0x0 0x0 0x4 0x1 0x1 0x1 0x1
2026-03-11 22:31:28,631 DEBUG decoders:77 decoded PDU function_code(1 sub -1) -> ReadCoilsResponse(dev_id=0, transaction_id=0, address=0, count=0, bits=[True, False, False, False, False, False, False, False], registers=[], status=1, retries=0)
2026-03-11 22:31:28,631 DEBUG transport:393 send: 0x0 0x2 0x0 0x0 0x0 0x6 0x1 0x3 0x0 0x4 0x0 0x2
2026-03-11 22:31:28,632 DEBUG transport:339 recv: 0x0 0x2 0x0 0x0 0x0 0x7 0x1 0x3 0x4 0x0 0x11 0x0 0x11 extra data:
2026-03-11 22:31:28,632 DEBUG base:72 Processing: 0x0 0x2 0x0 0x0 0x0 0x7 0x1 0x3 0x4 0x0 0x11 0x0 0x11
2026-03-11 22:31:28,632 DEBUG decoders:77 decoded PDU function_code(3 sub -1) -> ReadHoldingRegistersResponse(dev_id=0, transaction_id=0, address=0, count=0, bits=[], registers=[17, 17], status=1, retries=0)
Versions
Pymodbus Specific
Description
I am running the async client / server examples. I expect to see
INFOlevel logs and do not see most/any of them.Additionally, the CLI option
--loghas little effect.Code and Logs
Info Level
Setup:
For the server:
For the client:
Notably:
__file__had no impact on logger configuration; it is omitted entirelyINFOlevel statements appear in client logs, though they are implementedDebug Level
Setup:
For the server:
For the client:
Notably:
__file__had no impact on logger configuration; it is omitted entirelyINFOlevel statements fromserver_async.pyappear, though they are implementedINFOlevel statements fromclient_async.pyappear, though they are implemented