Stop logging IoTEdge messages to docker logs

• Hardware Platform (Jetson / GPU) GeForce GTX 1050Ti
• DeepStream Version: 5.0
• Issue Type( questions, new requirements, bugs) Question
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)

I’m running Deepstream 5.0 with IoTEdge and Docker. Deepstream creates messages if any object is detected and send it to IoTHub. For initial development phase, it is good to have these messages and logs. But in production, our application will be running 24/7 and it will create so many such messages. I just want to stop logging/displaying these messages on my device as it’s occupying so much space after few days.
You can check these messages logged as below steps:

  1. Check running IoTEdge container docker ps -a
  2. Get container id and try command docker inspect {container_id}
  3. Then check for LogPath, then use this logpath to check the logs
  4. You will find some path like this - /var/lib/docker/containers/…/…-json.log
  5. If you see this file, it’s continuously logging so many messages like {"log":"\n","stream":"stdout","time":"2021-01-25T09:36:27.616163948Z"} including the IoTEdge JSON messages generated to be sent to IoTHub.

I need help here to stop these messages being logged.

Hi @archana ,
Got your issue, will check and get back to you in these two days.

Thanks!

Hi,
Docker provides the option to set the max size for log file. You can explore that option to fix the max size for logging.

Ok, I will try that. Still wanted to know if any way available to stop logging IoTEdge messages like “Message Sent {}”.

Hi @mchi,

I will try to change the logging levels and let you know.
Is it possible to modify it from Azure Protocol Adapter file? I don’t see the source code for the same in Deepstream I installed, only .so file is there.

Hi,
Azure module client using different logging method than other adapter using nvds_logger, so you can not set log level for module client, you can refer to this, Gst-nvmsgbroker — DeepStream DeepStream Version: 5.0 documentation
Part: Monitor Adapter Execution
try to set docker option to limit logging size.

Hi @amycao,
In that case, can we change the Azure module client adapter lib to stop these messages?

You can not stop the logging, azure adapter not open sourced.

1 Like

Ok, then I will give try to limiting Docker logs and let you know. Thank you for the help.

Hi @amycao, setting up docker limit worked. Thanks.