diff --git a/send-data/nextjs.mdx b/send-data/nextjs.mdx index 8a88577..6939c07 100644 --- a/send-data/nextjs.mdx +++ b/send-data/nextjs.mdx @@ -233,6 +233,6 @@ export default function ErrorPage({ To extend the logger, use `log.with` to create an intermediate logger. For example: ```typescript -const logger = userLogger().with({ userId: 42 }); -logger.info('Hi'); // will ingest { ..., "message": "Hi", "fields" { "userId": 42 }} +const userLogger = useLogger().with({ userId: 42 }); +userLogger.info('Hi'); // will ingest { ..., "message": "Hi", "fields" { "userId": 42 }} ```