anvilresearch / connect-cli

CLI for Anvil Connect
MIT License
3 stars 11 forks source link

Do not save Redis logs to file, output to stdout #60

Open adalinesimonian opened 9 years ago

adalinesimonian commented 9 years ago

Saving the logs to a file completely sidesteps Docker's logging functionality and renders it useless. i.e., running docker logs [redis_container_id] with the current image will return no output.

In order to allow Docker's log-capturing to work with the image, we need to output to stdout/stderr. Replacing logfile [logpath] in redis.conf with logfile "" fixes this problem. However, since this is a change in functionality, I'm opening an issue first to make sure we're all OK with this change.

christiansmith commented 9 years ago

I'd like to have a discussion about this with some ops-oriented folks and current production users to see what they think.

@adi-ads and @tomkersten might be able to give us some real world feedback. Aren't you guys running this in Docker? Anyone else?

tomkersten commented 9 years ago

I believe it's technically possible to log to both, but logging to STDOUT is both sufficient and the generally accepted practice, so it is a good/valid suggestion.

msamblanet commented 9 years ago

When in docker in my personal apps, I like logging to stdout. Many of the node launchers (pm2, docker, etc) expect this pattern and console redirection or tee'ing are not hard. If in doubt, you could do stdout by default and offer an env variable to tell the container startup script to log to a file instead...

yinrong commented 5 years ago

+1 need to log to stdout/err