Docker error log on valid compose exit

Hello I have a question on a specific docker compose behavior that I haven’t been able to find an answer to anywhere.

For reference, I am running these versions:

❯ docker -v
Docker version 20.10.13, build a224086
❯ docker compose version
Docker Compose version v2.3.3

My question is why does the docker logger return an ERRO log event after a compose up --abort-on-container-exit command?

Here’s an example…

version: "3.9"
    image: alpine:latest
    command: echo "Hello"

docker compose up --build --abort-on-container-exit

[+] Running 1/0
 ⠿ Container quip-web-1  Created                                                                                                                                                                                                                                                                                                                                     0.0s
Attaching to quip-web-1
quip-web-1  | Hello
quip-web-1 exited with code 0
Aborting on container exit...
[+] Running 1/0
 ⠿ Container quip-web-1  Stopped                                                                                                                                                                                                                                                                                                                                     0.0s
ERRO[0000] 0    

ERRO[0000] 0 is a Docker Error log. It is display the exit code of the app I see, but why an error log? It’s not an error.

I know I can hide that log event by setting --log-level fatal on docker, but that isn’t wanted behavior for my case.

It’s also important to note that this behavior is unique to compose v2. compose v1 doesn’t show this error log event on the same command.

I guess because it could either be sent to the standard output or the standard error stream. If we want to redirect a stream for example into a file, we usually want to keep the standard output clean and see the actual result of a calculation or something. Other status messages can be sent to the standard error streams even if that status message indicates that there is no error at all.

If you for example run an nginx container, you will find access logs in the standard output and error logs in the standard error stream, but you will also find the initial status messages in the error stream:

docker run --rm nginx 1>/dev/null
2022/05/03 19:11:52 [notice] 1#1: using the "epoll" event method
2022/05/03 19:11:52 [notice] 1#1: nginx/1.21.6
2022/05/03 19:11:52 [notice] 1#1: built by gcc 10.2.1 20210110 (Debian 10.2.1-6)
2022/05/03 19:11:52 [notice] 1#1: OS: Linux 5.10.104-linuxkit
2022/05/03 19:11:52 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
2022/05/03 19:11:52 [notice] 1#1: start worker processes
2022/05/03 19:11:52 [notice] 1#1: start worker process 32
2022/05/03 19:11:52 [notice] 1#1: start worker process 33
2022/05/03 19:11:52 [notice] 1#1: start worker process 34
2022/05/03 19:11:52 [notice] 1#1: start worker process 35