How do I view logs from before the most recent deployment? (pro plan)
ronit-tiwary
PROOP

2 years ago

Besides my last deployment (which says active), all my other deployments are greyed out and say skipped. That's fine, but I'm only able to view logs for my active deployment, and all other past deployments show "No deployment logs. All output sent to stdout will be displayed here".

I'm on a pro plan and so I believe my logs should be stored for up to 30 days.

19 Replies

ronit-tiwary
PROOP

2 years ago

project id: 6f77d8dd-a5b1-444e-a5a1-0194447af261


2 years ago

can you link to a specific service?



ronit-tiwary
PROOP

2 years ago

does that link work for you?


2 years ago

yes, can you also provide a link to a deployement that shows no logs



2 years ago

they are all skipped, can you explain why you would expect to see deployment logs for them?


ronit-tiwary
PROOP

2 years ago

ah that is me being stupid- the removed and skipped tag looked the same to me


ronit-tiwary
PROOP

2 years ago

I do see some logs that appear to be missing though from this deployment: https://railway.app/project/6f77d8dd-a5b1-444e-a5a1-0194447af261/service/d4328b3f-da6f-49c0-a642-1b8311c52077?id=ef588e61-341c-4f04-810e-31741c72c6d5

I see logs from one user's session but not another. Is there that might go wrong with concurrent requests being logged with railway? I'm a bit confused because I see records of user #2's session in our database which means the logs should have been written. <:thinkies:1238577143466692739>


ronit-tiwary
PROOP

2 years ago

I do see some logs from user #2 session but it appears like a bunch of earlier ones are missing

1315011158612246579


2 years ago

how are you logging? are you using some kind of logging library?


ronit-tiwary
PROOP

2 years ago

yeah, winston


2 years ago

are you making sure to disable log buffering


ronit-tiwary
PROOP

2 years ago

I don't have it enabled and I think it's disabled by default. This is our setup:

const logger = winston.createLogger({
  level: 'info',
  format: winston.format.combine(
    winston.format.timestamp(),
    winston.format.json()
  ),
  defaultMeta: { service: 'audio-response-service' },
  transports: [
    new winston.transports.Console(),
  ],
});

2 years ago

you'd want to explicitly disable it


ronit-tiwary
PROOP

2 years ago

do you have an example of configuration of that? I remember seeing winston was your recommended one but your docs page seems to be down for me: https://docs.railway.com/guides/logs


2 years ago

it wouldn't be railway specific configuration, you'd want to reference Winston's docs


ronit-tiwary
PROOP

2 years ago

right, I just thought that there might be something in your docs since it was recommended. I've been looking for a while and I don't see anything about buffering or how to disable it, so I assume it doesn't exist by default. Any other recommendations?


2 years ago

if buffering is off and those logs aren't there, your application never logged them


Welcome!

Sign in to your Railway account to join the conversation.

Loading...