Skip to content

Conversation

@codemod
Copy link

@codemod codemod bot commented Oct 31, 2025

This is a pull request for the console to pino workflow

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, and console.info with 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.

Comment on lines +3 to 4
const logger = pino()

Copy link

Copilot AI Oct 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
const logger = pino()

Copilot uses AI. Check for mistakes.
Comment on lines +4 to 5
const logger = pino()

Copy link

Copilot AI Oct 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar naming conflict exists here - both the imported logger and the newly declared pino logger use the same variable name 'logger'.

Suggested change
const logger = pino()

Copilot uses AI. Check for mistakes.
@@ -1,3 +1,5 @@
import pino from 'pino'
const logger = pino()
Copy link

Copilot AI Oct 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another naming conflict between the imported logger and the pino logger constant declared later in the file.

Suggested change
const logger = pino()
const pinoLogger = pino()

Copilot uses AI. Check for mistakes.
@@ -1,6 +1,8 @@
import pino from 'pino'
import { getLocation } from "@calcom/lib/CalEventParser";
import logger from "@calcom/lib/logger";
Copy link

Copilot AI Oct 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Naming conflict between imported logger and pino logger constant needs to be resolved.

Copilot uses AI. Check for mistakes.
import logger from "@calcom/lib/logger";
import prisma from "@calcom/prisma";
import type {
const logger = pino()
Copy link

Copilot AI Oct 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another instance of naming conflict between the existing logger import and the new pino logger constant.

Suggested change
const logger = pino()
const pinoLogger = pino()

Copilot uses AI. Check for mistakes.
@codemod codemod bot force-pushed the codemod-603a608e branch from 70cc1d5 to 5a35797 Compare December 7, 2025 17:30
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

Successfully merging this pull request may close these issues.

3 participants