Why is Docker Logging Everything to Standard Error?

0
8
Asked By WanderLust89 On

I've noticed that all the output in my GitHub workflows is being directed to standard error. I'm curious about why this is happening, and if there's any way to change it. Thanks for your help!

5 Answers

Answered By DockerDude89 On

If you're running your Docker app in detached mode with `-d` and still checking logs with `docker compose logs`, those are still sent to stderr. That's just how it works.

Answered By CodeSlinger42 On

In most cases, standard output (stdout) is meant for regular app output and results, while errors, logs, and diagnostic info typically go to standard error (stderr). It’s just a default convention in many systems.

Answered By TechNerd2023 On

If you're looking to modify where your logs are sent, Docker does allow for different log drivers. You can check out the logging options in the Docker documentation to explore that.

Answered By DevGuru_X On

Just curious, where would you prefer the logs to go? Seems like stdout could be an option!

WanderLust89 -

Yeah, stdout would be ideal for my needs.

Answered By LogMaster9000 On

Can you share what programming language your service is using and how it's set up? The handling of output might be more of a service configuration issue than a Docker one.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.