connextdds-py icon indicating copy to clipboard operation
connextdds-py copied to clipboard

Using python builtin logging facility for connextdds-py logs

Open mika1337 opened this issue 3 years ago • 3 comments

The RTI DDS Python API has its own logging facility (rti.logging) configured with xml qos profile. Python provides builtin logging facility which is broadly used in the Python development community.

It would be great to allow "pluging" the rti logging facility to the Python builtin logging facility having a single configuration for all the logs (and a single output).

mika1337 avatar Jan 03 '23 12:01 mika1337

The rti logging module has a DistLogHandler class that should be usable with the standard logging module.

marc-chiesa avatar Jan 19 '23 01:01 marc-chiesa

I believe this module is for the logs produced by the Python code. I was also referring to RTI Core libraries thus having all logs manageable with Python logging facility.

mika1337 avatar Feb 23 '23 10:02 mika1337

DistLogHandler creates an RTI Distributed Logger instance that integrates with standard Python logging. When configured correctly, the RTI Distributed Logger should send both Connext internal info and Python user logs on the distlog DDS topic. It doesn’t provide a consolidated stream on all Python log handlers, but it does give you one option.

Link to doc

marc-chiesa avatar Mar 28 '23 06:03 marc-chiesa