Conversation
There was a problem hiding this comment.
Pull Request Overview
This pull request refactors console logging throughout the codebase by replacing console methods with pino structured logging. The purpose is to standardize logging practices using pino for better log management, structure, and filtering capabilities.
Key changes:
- Imports pino logger in 135+ files
- Replaces
console.log,console.error,console.warn, andconsole.infowith equivalent pino methods - Maintains existing log levels by mapping console methods to appropriate pino methods
Reviewed Changes
Copilot reviewed 297 out of 312 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/trpc/server/routers/viewer/* | Multiple TRPC router handlers updated to use pino logging |
| packages/prisma/* | Database seeding and utility scripts migrated to pino |
| packages/app-store/* | App store components and services converted to structured logging |
| apps/web/* | Web application components and API routes updated with pino |
| packages/lib/* | Core library functions standardized with pino logging |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const logger = pino() | ||
|
|
There was a problem hiding this comment.
There's a naming conflict - both the imported logger and the newly declared pino logger are named 'logger'. This could cause confusion and potential runtime issues.
| const logger = pino() |
| const logger = pino() | ||
|
|
There was a problem hiding this comment.
Similar naming conflict exists here - both the imported logger and the newly declared pino logger use the same variable name 'logger'.
| const logger = pino() |
| @@ -1,3 +1,5 @@ | |||
| import pino from 'pino' | |||
| const logger = pino() | |||
There was a problem hiding this comment.
Another naming conflict between the imported logger and the pino logger constant declared later in the file.
| const logger = pino() | |
| const pinoLogger = pino() |
| @@ -1,6 +1,8 @@ | |||
| import pino from 'pino' | |||
| import { getLocation } from "@calcom/lib/CalEventParser"; | |||
| import logger from "@calcom/lib/logger"; | |||
There was a problem hiding this comment.
Naming conflict between imported logger and pino logger constant needs to be resolved.
| import logger from "@calcom/lib/logger"; | ||
| import prisma from "@calcom/prisma"; | ||
| import type { | ||
| const logger = pino() |
There was a problem hiding this comment.
Another instance of naming conflict between the existing logger import and the new pino logger constant.
| const logger = pino() | |
| const pinoLogger = pino() |
70cc1d5 to
5a35797
Compare
This is a pull request for the console to pino workflow