Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logger printing extra metadata in development logs when using edge functions #171

Open
jamiew opened this issue Nov 15, 2023 · 0 comments
Open

Comments

@jamiew
Copy link

jamiew commented Nov 15, 2023

I'm using Nextjs 12 + edge functions

In development I see a heap of extra logging compliments of logEdgeReport inside next-axiom, which uses console.log to print out a bunch of extra debugging with no obvious way to silence it. e.g.

info - My log line {
/* my extra args */
} {
  startTime: 1700070564334,
  path: 'http://localhost:3000/api/blahblah',
  method: 'POST',
  host: 'localhost:3000',
  userAgent: 'Mozilla/5.0...',
  scheme: 'https',
  ip: null,
  region: ''
}

as well as the AXIOM_EDGE_REPORT lines:

AXIOM_EDGE_REPORT::{"startTime":1700070564334,"path":"http://localhost:3000/blahblah","method":"POST","host":"localhost:3000","userAgent":"Mozilla/5.0...","scheme":"https","ip":null,"region":""}

Was this logging intended just for production?

Would y'all accept a PR to disable this by default? perhaps by inspecting NODE_ENV, VERCEL_ENV or similar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant