Hilscher Community Forum
[SOLVED] STDOUT logging when container is started with -I and some CMD - Printable Version

+- Hilscher Community Forum (https://forum.hilscher.com)
+-- Forum: netPI 3 - Docker featuring Industrial Raspberry Pi 3 platform (https://forum.hilscher.com/forum-1.html)
+--- Forum: Software (https://forum.hilscher.com/forum-5.html)
+--- Thread: [SOLVED] STDOUT logging when container is started with -I and some CMD (/thread-246.html)



[SOLVED] STDOUT logging when container is started with -I and some CMD - Thomas - March-26th-2018

Hi Armin,

I ran into an issue where the netPi stopped working and the SD-card was completely full. I assume it was because STDOUT and STDERR are logged when a container is started with interactive shell and a CMD which writes to STDOUT and STDERR. The logs can be accessed through portainer, container details. Is there a possibility to clear the logs or to limit the size of the log-files when the container is created?
I had to delete and recreate the container to get it up and running again. It might be desirable to have the logs, but the netPi should not stop working because of it. Especially not when running in an industrial application.

Best regards
Thomas


Answer - Armin@netPI - March-26th-2018

Hello Thomas,

interesting aspect. We have never thought about an issue that a docker logging file could produce an issue.

At the current stage I even don't know if a container really stops working in the case the SD card is getting full, but I trust your experience cause I don't have any life example of a container doing the same.

Today there is no possibility I see no possibility to disable this logging mechanism. I agree that this is getting critical in case a container really stops its operation.

Since in a container it is still under you control what is sent to the STDOUT, I would recommend to insert an environment variable "DEBUG" for example and test in all echoing applications you are running the existence of it to decide whether or not to output data on STDOUT. Other methods I don't see right now.


RE: STDOUT logging when container is started with -I and some CMD - Armin@netPI - August-23rd-2018

With netPI firmware V1.1.3.0RC3 this problem is solved and the log file is limited to a size of 1Mbyte now.