I am using ModbusTcpServer(context, identity=identity, address=(listener_address, listener_port))
, here ModbusTcpServer is a function that is imported from pymodbus, I want to get the IP of client that get connected to the server for the logging purpose but unable to find a solution. It will be very helpful if someone can give a solution
Asked
Active
Viewed 338 times
0

UPENDRA BARTWAL
- 11
- 2
-
If you enable debug logs, you should see it as part of the logs. Refer https://github.com/riptideio/pymodbus/blob/master/pymodbus/server/sync.py#L46 – Sanju Mar 05 '21 at 07:35
-
Actually I am trying to use a implemented version on internet [link](https://bitbucket.org/Cybcon/modbus-server/src/master/) and it has mention logging format (in defualt configuration )which does not include client IP, hoping someone know the keyword to include to get that ip. – UPENDRA BARTWAL Mar 09 '21 at 10:20