rticommunity / connextdds-py

Connext DDS Python API
Other
27 stars 12 forks source link

Using python builtin logging facility for connextdds-py logs #51

Open mika1337 opened 1 year ago

mika1337 commented 1 year ago

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).

marc-chiesa commented 1 year ago

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

mika1337 commented 1 year ago

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.

marc-chiesa commented 1 year ago

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