Hi, I just started using Typesense and I really li...
# community-help
s
Hi, I just started using Typesense and I really like it. I have one question. Why is all logging output directed to stderr?
k
👋 Glad to hear you like it. May I know on which environment you are running Typesense?
s
I'm running docker containers on K8
But I confirmed this is also the case for the latest docker image
running locally
k
🤔 How do you differentiate between stdout and stederr? If I am not wrong,
docker logs
shows both stdout and stderr.
Okay, I confirmed that docker logs is indeed full of only stderr!
Any idea why this would be the case? This is the Dockerfile used to build the container, fairly straightforward: https://github.com/typesense/typesense/blob/master/docker/deployment.Dockerfile
s
No idea. I'll take a look
Copy code
In typesense_server_utils.cpp
    if(log_dir.empty()) {
        // use console logger if log dir is not specified
        FLAGS_logtostderr = true;
    }
only stderr output flag set
🤦 1
k
Thanks for catching that, but I think the reason I had to do this was because of some GLOG quirk. Let me look into it.
Frustrating, GLOG only has option to log to stderr only for console logging.
s
Agreed, seems like a pretty terrible library and no way to configure it.
Created an issue on this.
And thank you for the quick response!