R
Railwayβ€’9mo ago
Ryno

Not seeing logs on Railway

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<PrismaRepository | { error: string }> => {
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');
...
repositories.post('/repositories', async ({ set, body }): Promise<PrismaRepository | { error: string }> => {
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');
...
6 Replies
Percy
Percyβ€’9mo ago
Project ID: f70749b3-5be0-468e-abb7-4bfb1c4cf260
Ryno
RynoOPβ€’9mo ago
I am using the latest version of Bun, and am also using turborepo.
Brody
Brodyβ€’9mo ago
for fun, can you try this instead? await Bun.write(Bun.stdout, "Lorem ipsum");
Ryno
RynoOPβ€’9mo ago
Still no luck
Brody
Brodyβ€’9mo ago
zero logs what so ever? of any kind, from anywhere in your app?
Ryno
RynoOPβ€’9mo 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 πŸ˜…
Want results from more Discord servers?
Add your server