#logger not showing any request logs
69 messages · Page 1 of 1 (latest)
dfa9f140-9408-44b8-927f-67fe0b663a57
are you using gunicorn to run your app on railway?
yea
i think you may need to enable access logs through gunicorn, i dont believe they are enabled by default
im only accessing gunicorn through procfile:
web: gunicorn app:app
so i need to have the logs print out to a seperate file first?
when i was using heroku, ik the req logs for the app would show by default
so tryna figure it out for here
you want to log to stdout
have you read the docs section i linked? it tells you exactly how to log access logs to stdout
yep
ah so now i j gotta add all the logging manually i think
no? with that config flag gunicorn should print the access logs for you now
yeah i thought so to but idt it was lemme check again
have you tried it on railway yet?
you have --access-logfile '-' in your procfile?
yes sir. web: gunicorn app:app --access-logfile '-'
oh wait im dumb, i was onlny updating the procfile in my codebase, not on railway smh
thought it read my procfile lol
youd need to push changes to github
i did, the procfile i have is in the github but the railway procfile was showing as the default one
where are you viewing this "railway procfile"
the start command
screenshot please
it was not empty. i emptied it for the picture. it was orignally filled with "gunicorn app:app"
okay keep it empty
and just use the procfile in the code base right?
yep
idk why its not showing any sdout logs
web: gunicorn app:app --access-logfile '-' --log-level debug
tried with this and without the quotes
what does the build table at the top of the build logs say?
🥳
the [DEBUG] logs are railway correct?
in red
oh nvm
thats from procfile
tysm for ur help, just started using railway tn xD, so awesome
some loggers print to stderr when they should be printing to stdout, so railway highlights them as red
gotcha yeah i removed the -debug which doesnt show now, j playing around w it
is there a way to clear the logs?
from Observability
haha no that would kind of defeat the purpose of that feature
yeah true jw for previous logs
well the point of it is to observe logs from the past and future, so clearing it would kinda defeat that purpose
yeah gotcha
all logs from the deployment log view are from your app, railway doesnt log anything for you
a replica is a clone / duplicate / replica of your service
you want 5 replicas, railway will spin up 5 duplicates of your service and round robin proxy incoming requests to those 5 duplicate services
gotcha, so does it have anything to do w making the app faster, or it just creates replicas?
under high load adding more replicas would help to spread out the compute across multiple replicas, and not to gatekeep, but most hobby projects wont need any replicas