Skip to content

Improving request logging. #90

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
AllanKlaus opened this issue Dec 12, 2019 · 8 comments
Open

Improving request logging. #90

AllanKlaus opened this issue Dec 12, 2019 · 8 comments

Comments

@AllanKlaus
Copy link

I'm trying to use falcon on production in one app that I'm creating. Now I'm blind of logs, I don't know what happen when I run the app it don't show any logs of requests only the database interactions.

I'm running my app using foreman with the command falcon serve -b http://0.0.0.0:9292. Everything is running on a container. I didn't change anything on the config/enviroment/production.rb it's running all the rails default.

Can someone help me with this?

@ioquatix
Copy link
Member

The simplest way to get more information is to run with --verbose.

That being said, it produces a lot of information.

We should probably provide a middle ground for just logging requests.

Logging like this impacts performance, so it's not by default.

A simple solution which works everywhere is to use a logging middleware.

I'll think about the best way to solve this issue.

@ioquatix ioquatix changed the title Using Logs Improving request logging. Dec 12, 2019
@AllanKlaus
Copy link
Author

i will try it. thanks. If there is something that I can do to help, just let me know.

@buhrmi
Copy link
Contributor

buhrmi commented Mar 31, 2025

I found that the problem with the squelched logs in Falcon lies with foreman. Switching over to hivemind (another Procfile-based process manager) fixed it.

@ioquatix
Copy link
Member

Do you know why it made a difference?

@buhrmi
Copy link
Contributor

buhrmi commented Apr 1, 2025

Not really. But in the hivemind readme (https://github.com/DarthSim/hivemind) they write Hivemind uses pty to capture process output. That fixes any problem with log clipping, delays, and TTY colors other process management tools may have.. So apparently it's a common thing and not Falcon-specific. Wouldn't lose sleep over it 😅

@buhrmi
Copy link
Contributor

buhrmi commented Apr 1, 2025

And The problem with most of those tools is that processes you want to manage start to think they are logging their output into a file, and that can lead to all sorts of problems: severe lagging, losing or breaking colored output.

@ioquatix
Copy link
Member

ioquatix commented Apr 1, 2025

Yes that makes sense, if you want to capture TTY output then you need to simulate a TTY for the child process. And you are correct this is not Falcon specific.

@buhrmi
Copy link
Contributor

buhrmi commented Apr 1, 2025

yeah just wanted to note my findings here to help close this issue, unless you don't like closing issues 🤔😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants