Ryno
Ryno
Explore posts from servers
RRailway
Created by Ryno on 3/1/2024 in #✋|help
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');
...
8 replies