Skip to content

Console.log Statements in Production Code #29

@Adithyakp86

Description

@Adithyakp86

name: Bug Report
about: Report a bug or problem
title: "[BUG] Console.log Statements Present in Production Code"
labels: bug
assignees: ''

Description

Multiple services contain console.log and console.error statements that should be replaced with proper logging using the Winston logger. This creates inconsistent logging and potential security issues.

Steps to Reproduce

  1. Search the codebase for console.log and console.error statements
  2. Found in multiple critical files:
    • api-gateway/src/controllers/auth.controller.ts
    • api-gateway/src/controllers/repo.controller.ts
    • api-gateway/src/controllers/env.controller.ts
    • notification-service/src/controllers/logs.controller.ts
    • WORKERS/clone-worker/src/GitHandler/PathCheck.ts

Expected Behavior

All logging should use the configured Winston logger for consistent formatting, levels, and destination handling.

Actual Behavior

Mixed logging approaches with direct console statements bypassing the logging infrastructure.

Environment Information

  • OS: Windows 22H2
  • Node.js Version: v18+
  • Service: Multiple services
  • Branch: main

Error Logs or Stack Trace

Examples found:

console.error(err); // api-gateway/src/controllers/auth.controller.ts:73
console.error("Error while destroying session: ", err); // api-gateway/src/controllers/auth.controller.ts:103
console.error(error); // api-gateway/src/controllers/repo.controller.ts:47
console.error('Invalid JSON:', raw); // notification-service/src/controllers/logs.controller.ts:91

**Before reporting a bug, please:**
- [ x] Check existing issues to see if this bug has already been reported
- [ x] Read [CONTRIBUTING.md](../../CONTRIBUTING.md) for guidelines
- [x ] Try to isolate the problem with minimal reproduction steps

Metadata

Metadata

Assignees

Labels

OSCG26assignedIssue is assigned to someonebugSomething is brokeneasyGood for beginners - minimal complexitygood first issueGood for newcomersstale

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions