R
Railway•4mo 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•4mo ago
Project ID: f70749b3-5be0-468e-abb7-4bfb1c4cf260
Ryno
Ryno•4mo ago
I am using the latest version of Bun, and am also using turborepo.
Brody
Brody•4mo ago
for fun, can you try this instead? await Bun.write(Bun.stdout, "Lorem ipsum");
Ryno
Ryno•4mo ago
Still no luck
Brody
Brody•4mo ago
zero logs what so ever? of any kind, from anywhere in your app?
Ryno
Ryno•4mo 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 😅