Runtime messages not visible in browser, but can be viewed via CLI

I am testing out Vercel for a small project. So far I am impressed.

Currently, I am trying to figure out the logging. When I use the CLI to view the logs vercel logs, I can see my console.log statements.

However, I cannot see them in the log browser on the dashboard. In the dashboard, I can see the requests and their response code, but none of my console.log statements.

Is this expected behavior on the hobby plan or am I missing an option somewhere?

Can you show us the code base? I created an edge function and cannot reproduce this unfortunately:

import { NextResponse } from 'next/server'

export async function GET() {
  const message = 'hello logs'
  console.log(message)
  return NextResponse.json({ body: { status: 'ok',  message } }, { status: 200 })
}
1 Like

Hi Swarnava,

I just wanted to follow up. It looks like I can’t reproduce it any more. I am sure it was because of my code, potentially related to NextJS prerendering or caching that I don’t fully understand yet and will now study in more detail.

Thanks!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.