Skip to content
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

feat: route access logs to stdout #68

Closed
wants to merge 3 commits into from
Closed

Conversation

josegonzalez
Copy link
Member

Closes #35

`/dev/stdout` appears to have permissions issues, while the comments on this stackoverflow post[1] appear to indicate that stdout should work fine.

[1] https://stackoverflow.com/a/23328458/1515875
@josegonzalez
Copy link
Member Author

Doesn't seem like this works:

  • /dev/stdout doesn't work because we don't have permissions to it in herokuish. Not sure if thats the case on heroku.
  • stdout does nothing, even on newer nginx...

I'll check if maybe /dev/stdout and /dev/stderr are readable/writable on heroku, in which case we can fix this in herokuish.

@josegonzalez josegonzalez deleted the 35-access-log-stdout branch February 9, 2024 03:28
@josegonzalez
Copy link
Member Author

The path /dev/stdout appears to be writeable in heroku but anything written to it doesn't show up in heroku logs output:

josediazgonzalez@MacBook-Pro smoke-test-app % heroku ps:exec
Running this command for the first time requires a dyno restart.
Do you want to continue? [y/n]: y
Initializing feature... done
Restarting dynos... done
Waiting for web.1 to start... done
Establishing credentials... done
Connecting to web.1 on ⬢ jdg-test...
~ $ ps auxf
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
nobody         1  0.0  0.0   1308     4 ?        Ss   03:47   0:00 ps-run
u52973         2  0.4  0.0  29328 16744 ?        S    03:47   0:00 python3 web.p
u52973        24  0.0  0.0   4496  2136 ?        S    03:47   0:00  \_ /bin/bash
u52973        43  0.1  0.0  11316  8072 ?        S    03:47   0:00      \_ ssh -
u52973        23  0.0  0.0  15432  5488 ?        Ss   03:47   0:00 sshd: /usr/sb
u52973        44  0.0  0.0  15432  9048 ?        Ss   03:47   0:00  \_ sshd: u52
u52973        46  0.0  0.0  15692  6108 ?        S    03:47   0:00      \_ sshd:
u52973        47  0.0  0.0   4596  3812 pts/0    Ss   03:47   0:00          \_ -
u52973        49  0.0  0.0   7064  1652 pts/0    R+   03:47   0:00             p
~ $ ps auxf | grep python
u52973         2  0.2  0.0  29328 16744 ?        S    03:47   0:00 python3 web.py
u52973        24  0.0  0.0   4496  2136 ?        S    03:47   0:00  \_ /bin/bash -l -c python3 web.py
u52973        51  0.0  0.0   3472  1572 pts/0    S+   03:47   0:00              \_ grep python
~ $ echo "derp" > /dev/stdout
derp
~ $ echo "derp" > /dev/stdout
derp
~ $ echo "derp" > /dev/stderr
derp
~ $ %

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

Successfully merging this pull request may close these issues.

Buildpack does not provide logging
1 participant