Docker stdout issue

Hello, I am forwarding my application logs to stdout and stderr, but I can only see stderr logs with “docker logs container_id”. Unfortunately, I can’t get the stdout logs. This is a java application. How can I debug this? There is no problem when I try it in Nginx or Apache.

Are you sure your root logger and all other loggers you configured are pointing to the console logger (which itself writes its output to STDOUT)?

Thanks for the answer.

I use as follows on Dockerfile.

RUN ln -sf /dev/stdout /opt/webapp/app.log

I think I don’t need to change anything on the java side.

But it’s not working, is it?

Isn’t it cleaner to solve a configuration problem, where the configuration actualy needs to be done?!
This is definititly not a java problem, as a proper configured logger would not result in the problem you are having.