Closed zw963 closed 5 months ago
Hey @zw963 in development, you can set CONSOLE_OUTPUT=Text
which will keep the output as a human readable (non-JSON) format. I added it to my local .env
file and never thought about it again.
In non development environments, JSON is nice to have so I don't fault the default when it doesn't detect an interactive terminal--FYI, through Foreman, that's what is happening.
This issue similar as #90, but will more details and context, and explain why.
I am working on a personal app which use Roda + Sequel stack, i used puma for deploy, and switch to falcon for a while, it works, but, with some issue, see following detail.
I use Roda
common_logger
plugin for send log to a Logger.new($stdout), it works.Please notice i set LOGGER.level to WARN on production.
it works quite well, when run
bundle exec puma
orbundle exec falcon serve --port 3000
directly from foreground, as a nginx backend, i can see expected http logs output to STDOUT.Following is output from
bundle exec falcon serve --port 3000
.Following is output from
bundle exec puma
, with following config.Use following config for puma.
But when deploy on really production, i ran those server use a foreman like tools, it named procodile, i know it perhaps falcon not recommended be start like this way, but, anyway, because switch from puma just now, i still keep use old config, then, i meet the issue.
So, for debug purpose, i run procodile on foreground, like this:
procodile start --foreground
When Procfile is puma
As you can see, i can see same log output as before.
Then, the issue is coming, when Procofile is falcon, like this:
I can not see any HTTP logs as before, it confusing ...
In fact, i guess falcon do two things
For 1, it change log format unexpected (JSON format maybe useful, but if like user config it manually, is better) For 2, raise exception (JSON format) immediately, but cache the log from STDOUT(http normal log), make this log not so useful.
Maybe what i thought on this issue is not correct, anyway, it should be more clear on why log behavior like this, i guess several issue is relative to this too.
Thank you.