supertokens-core icon indicating copy to clipboard operation
supertokens-core copied to clipboard

(Intermediate) Docker image's error log not in stderr

Open rishabhpoddar opened this issue 4 years ago • 6 comments

The repo containing the Dockerfile and the entrypoint is here.

rishabhpoddar avatar Sep 11 '20 14:09 rishabhpoddar

Could you please elaborate the issue. I'm willing to work on the Dockerfile

AnmolVirdi avatar Oct 04 '21 00:10 AnmolVirdi

@AnmolVirdi , the core has two types of outputs:

  1. Debug / info logs
  2. Error logs

Without docker, the output of (1) is sent to a file called info.log, and output of (2) is sent to error.log. In the code, the error logs are printed using System.err.println, here and the info logs are printed using System.out.println, here.

The problem comes in the docker container, where both these types of logs are being printer to the STDOUT instead of one being printed to STDOUT and one to STDERROR.

rishabhpoddar avatar Oct 04 '21 05:10 rishabhpoddar

Has anyone been able to reproduce this?

I forced an error by putting an exclamation mark before core_config_version in config.yaml and colored stderr red:

image.png

It appears to work.

yowayb avatar Jan 18 '22 07:01 yowayb

Okay thanks. We will recheck this

rishabhpoddar avatar Jan 18 '22 07:01 rishabhpoddar

It seems that https://github.com/supertokens/supertokens-core/blob/master/src/main/java/io/supertokens/webserver/WebserverAPI.java#L161 and https://github.com/supertokens/supertokens-core/blob/master/src/main/java/io/supertokens/webserver/WebserverAPI.java#L179 don't print out on stderr which is perhaps the root of the issue here.

rishabhpoddar avatar Jan 18 '22 11:01 rishabhpoddar

@rishabhpoddar, is the issue still relevant? Can I take it up?

relentless-pursuit avatar Feb 29 '24 20:02 relentless-pursuit