๐Ÿš€ Log - The Ultimate Console.log Management Extension

December 22, 2025 ยท View on GitHub

Log Extension

English | ็ฎ€ไฝ“ไธญๆ–‡

๐Ÿš€ Log - The Ultimate Console.log Management Extension

Stop wasting time typing console.log statements! This powerful VS Code extension revolutionizes your debugging workflow with intelligent log generation and comprehensive console statement management.

โœจ Why Choose Log Extension?

  • ๐ŸŽฏ Smart Variable Detection - Automatically detects variables under cursor
  • ๐ŸŽจ Beautiful Colored Output - Random colors for easy log identification
  • ๐Ÿ“ Context-Aware Insertion - Handles complex multi-line expressions perfectly
  • ๐Ÿงน Powerful Cleanup Tools - Remove console statements with precision
  • โšก Lightning Fast - One keystroke to generate logs
  • ๐ŸŽ›๏ธ Highly Configurable - Customize colors, patterns, and behavior

๐Ÿ”ฅ Key Features

๐Ÿ“ Intelligent Log Generation

  • Smart Insertion: Works with objects, arrays, function calls, and complex expressions
  • Multi-line Support: Correctly handles nested structures and multi-line expressions
  • File Context: Includes filename and line number for easy debugging
  • Variable Detection: Automatically detects variable names under cursor

๐Ÿงน Console Management Suite

  • Selective Removal: Remove specific console methods (log, warn, error, etc.)
  • Workspace Cleanup: Batch remove console statements across entire workspace
  • Preview Mode: See what will be removed before making changes
  • Smart Preservation: Keep console statements with specific patterns (TODO, KEEP)

โš™๏ธ Advanced Configuration

  • Custom Colors: Define your own color palette
  • Flexible Patterns: Configure file inclusion/exclusion patterns
  • Method Selection: Choose which console methods to target
  • Workspace Settings: Team-wide configuration support

โŒจ๏ธ Keyboard Shortcuts

ShortcutAction
Ctrl+Shift+L (Windows/Linux)
Cmd+Shift+L (macOS)
Insert console.log statement

๐ŸŽฎ Commands

  • log.log - Insert intelligent console.log statement
  • log.removeConsoleLogs - Remove console statements from active editor
  • log.removeConsoleLogsWorkspace - Remove console statements from entire workspace
  • log.previewRemoveConsoleLogs - Preview console statement removal

๐Ÿ› ๏ธ Configuration

{
  "codeLoc.config.colors": ["#ff6b6b", "#4ecdc4", "#45b7d1", "#96ceb4"],
  "log.removeConsole": {
    "methods": ["log", "warn", "error", "info", "debug"],
    "preservePatterns": ["TODO", "KEEP"],
    "includeTrailingNewLine": true
  },
  "log.removeConsole.workspace": {
    "includeGlobs": ["**/*.{js,jsx,ts,tsx}"],
    "excludeGlobs": ["**/node_modules/**", "**/dist/**"],
    "confirm": true
  }
}

๐Ÿ“– Usage Examples

Basic Usage

const user = { name: 'John', age: 30 };
// Place cursor on 'user' and press Ctrl+Shift+L
// Result: console.log('๐Ÿ“ file.js:2 user:', user);

Multi-line Objects

const config = {
  api: {
    url: 'https://api.example.com',
    timeout: 5000
  }
};
// Place cursor anywhere in the object and press Ctrl+Shift+L
// Log will be inserted AFTER the closing brace

Workspace Cleanup

Remove all console statements from your project while preserving important ones:

console.log('TODO: This will be kept');
console.log('Regular log'); // This will be removed
console.warn('KEEP: Important warning'); // This will be kept

๐ŸŽฏ Perfect For

  • Frontend Developers debugging React, Vue, Angular applications
  • Node.js Developers working with server-side JavaScript
  • TypeScript Projects with complex type definitions
  • Teams wanting consistent logging practices
  • Code Reviews requiring clean, console-free production code

๐Ÿš€ Get Started

  1. Install the extension from VS Code Marketplace
  2. Open any JavaScript/TypeScript file
  3. Place cursor on a variable
  4. Press Ctrl+Shift+L (or Cmd+Shift+L on macOS)
  5. Watch the magic happen! โœจ

demo

๐Ÿค Contributing

We welcome contributions! Please see our GitHub repository for more information.

โ˜• Support the Project

If this extension saves you time and makes your development experience better, consider supporting the project:

๐ŸŽฏ Buy me a coffee

๐Ÿ“„ License

MIT - Free and open source forever!