Home / File/ logger.ts — mcp Source File

logger.ts — mcp Source File

Architecture documentation for logger.ts, a typescript file in the mcp codebase. 0 imports, 4 dependents.

File typescript UtilityLibrary Zipper 4 dependents 4 functions

Entity Profile

Dependency Diagram

graph LR
  c78d0ed7_0af5_dfcf_6bfb_aff1a1d68fb1["logger.ts"]
  108c9ff4_bdb8_518a_9256_9ff4cd9d39a7["graph-cache.ts"]
  108c9ff4_bdb8_518a_9256_9ff4cd9d39a7 --> c78d0ed7_0af5_dfcf_6bfb_aff1a1d68fb1
  a8b6f9ab_3b5e_37b9_6276_9a5fda5bb2c4["index.ts"]
  a8b6f9ab_3b5e_37b9_6276_9a5fda5bb2c4 --> c78d0ed7_0af5_dfcf_6bfb_aff1a1d68fb1
  54581714_e921_5e5e_17c6_d2040cdc3b55["server.ts"]
  54581714_e921_5e5e_17c6_d2040cdc3b55 --> c78d0ed7_0af5_dfcf_6bfb_aff1a1d68fb1
  b00e0b6e_8e66_44d2_f709_c8c6bbb476c9["zip-repository.ts"]
  b00e0b6e_8e66_44d2_f709_c8c6bbb476c9 --> c78d0ed7_0af5_dfcf_6bfb_aff1a1d68fb1
  style c78d0ed7_0af5_dfcf_6bfb_aff1a1d68fb1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

/**
 * Simple logging utility with environment variable control
 *
 * Usage:
 *   DEBUG=true node dist/index.js  # Enable debug logging
 *   node dist/index.js             # Disable debug logging
 */

const DEBUG = process.env.DEBUG === 'true';

/**
 * Debug log - only shown when DEBUG=true
 * Uses stderr to keep separate from application output
 */
export function debug(msg: string, ...args: any[]) {
  if (DEBUG) {
    console.error('[DEBUG]', msg, ...args);
  }
}

/**
 * Info log - informational messages to stdout
 */
export function info(msg: string, ...args: any[]) {
  console.log('[INFO]', msg, ...args);
}

/**
 * Warning log - warnings to stderr
 */
export function warn(msg: string, ...args: any[]) {
  console.error('[WARN]', msg, ...args);
}

/**
 * Error log - errors to stderr
 */
export function error(msg: string, ...args: any[]) {
  console.error('[ERROR]', msg, ...args);
}

Subdomains

Frequently Asked Questions

What does logger.ts do?
logger.ts is a source file in the mcp codebase, written in typescript. It belongs to the UtilityLibrary domain, Zipper subdomain.
What functions are defined in logger.ts?
logger.ts defines 4 function(s): debug, error, info, warn.
What files import logger.ts?
logger.ts is imported by 4 file(s): graph-cache.ts, index.ts, server.ts, zip-repository.ts.
Where is logger.ts in the architecture?
logger.ts is located at src/utils/logger.ts (domain: UtilityLibrary, subdomain: Zipper, directory: src/utils).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free