Not seeing logs on Railway
developerryan
HOBBYOP

2 years ago

I'm new to Railway and I have a basic service setup running from a Dockerfile. I seem to be able to hit my service fine, but all of the logs within the request don't appear to be printed anywhere. Do I need to set something up in a particular way to see these? I am just using standard console.log statements.

e.g.

repositories.post('/repositories', async ({ set, body }): Promise => {
  const schema = z.object({
    repositoryName: z.string(),
    ownerId: z.string(),
  });

  const { repositoryName, ownerId } = schema.parse(body);

  try {
    set.status = 201;
    const newRepository = await prisma.repository.create({
      data: {
        name: repositoryName,
        ownerId: ownerId,
      },
    });

    console.log('🚧 Initializing new repository');
...

0 Replies

developerryan
HOBBYOP

2 years ago

f70749b3-5be0-468e-abb7-4bfb1c4cf260


developerryan
HOBBYOP

2 years ago

I am using the latest version of Bun, and am also using turborepo.


brody
EMPLOYEE

2 years ago

for fun, can you try this instead? await Bun.write(Bun.stdout, "Lorem ipsum");


developerryan
HOBBYOP

2 years ago

Still no luck


brody
EMPLOYEE

2 years ago

zero logs what so ever?


brody
EMPLOYEE

2 years ago

of any kind, from anywhere in your app?


developerryan
HOBBYOP

2 years ago

Hmm it looks like after doing some local testing I'm now also seeing this behavior, so likely unrelated to railway. I'll go ahead and close. Sorry 😅


Loading...