R
Railway16mo ago
Niccolò

Server logs?

I am wondering how to inspect the application server logs. Doing railway logs just tails the most recent deployment's logs. Thank you.
38 Replies
Percy
Percy16mo ago
Project ID: N/A
Niccolò
Niccolò16mo ago
N/A
Percy
Percy16mo ago
It seems that server logs are taking a long time to appear or not showing up at all. It appears that the issue is related to the ReactDevTools extension and that there is a 3-minute delay on the dashboard.
⚠️ experimental feature
Niccolò
Niccolò16mo ago
Not really my use case.
Finn
Finn16mo ago
you can view them on the website or do you need to see them via the cli?
Niccolò
Niccolò16mo ago
the website would be fine but where exactly?
Brody
Brody16mo ago
click on the desired deployment then click on tab for what type of logs you want to view
Niccolò
Niccolò16mo ago
The deploy logs are not tailing the application server for some reason. But the problem may be on my side, not yours.
Brody
Brody16mo ago
are you wanting to view logs from an older deployment in this scenario?
Niccolò
Niccolò16mo ago
I am interested only in the current deployment
Brody
Brody16mo ago
then railway logs or in the UI
Niccolò
Niccolò16mo ago
in the UI is fine
Brody
Brody16mo ago
what shows up in the cli?
Niccolò
Niccolò16mo ago
same as the UI I am using gunicorn as http server
Brody
Brody16mo ago
okay so what seems to be the problem?
Niccolò
Niccolò16mo ago
I think it's on my side actually
Brody
Brody16mo ago
???
Finn
Finn16mo ago
LOL
Niccolò
Niccolò16mo ago
maybe gunicorn should be configured to show logs but it's weird I should at least get something in the deployment logs
Brody
Brody16mo ago
you might be running into the python buffered logs issue but just not explaining things correctly
Niccolò
Niccolò16mo ago
I am thinking about it right here with you Let me recap I am visiting the Deploy Logs from either the CLI / UI I'd expect to see some kind of output from the application server but I don't
Brody
Brody16mo ago
set PYTHONUNBUFFERED = 1
Niccolò
Niccolò16mo ago
Ok, let me try.
Brody
Brody16mo ago
then don't say things are fine like you've previously stated
Niccolò
Niccolò16mo ago
I never said things are fine 🙂 I said that the problem might have been on my side
Brody
Brody16mo ago
^^
Niccolò
Niccolò16mo ago
and that I am not seeing anything in the logs because I might need to turn on logs in the app server No, I was just answering your question about where I would have preferred seeing the logs. "The UI is fine" means "I prefer the UI, thank you". You asked a question. 😄
Brody
Brody16mo ago
mhm
Niccolò
Niccolò16mo ago
I am going to try the environment variable you just suggested. I added the env var to the Django service, automatic redeploy kicked in, but to no avail.
Brody
Brody16mo ago
proof?
Niccolò
Niccolò16mo ago
Niccolò
Niccolò16mo ago
I wonder why it's not showing gunicorn's welcome screen or whatever it is the one that precedes the server loop
Brody
Brody16mo ago
have you setup any kind of logger or changed any logging levels?
Niccolò
Niccolò16mo ago
doing it right now
Brody
Brody16mo ago
that was just a question
Niccolò
Niccolò16mo ago
Yes, I realized I set gunicorn to be just "warnings" in the start command.
Brody
Brody16mo ago
yep that would do it keep that env variable in there for good measure though
Niccolò
Niccolò16mo ago
alright, thank you.