๐ Log - The Ultimate Console.log Management Extension
December 22, 2025 ยท View on GitHub
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
| Shortcut | Action |
|---|---|
Ctrl+Shift+L (Windows/Linux)Cmd+Shift+L (macOS) | Insert console.log statement |
๐ฎ Commands
log.log- Insert intelligent console.log statementlog.removeConsoleLogs- Remove console statements from active editorlog.removeConsoleLogsWorkspace- Remove console statements from entire workspacelog.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
- Install the extension from VS Code Marketplace
- Open any JavaScript/TypeScript file
- Place cursor on a variable
- Press
Ctrl+Shift+L(orCmd+Shift+Lon macOS) - Watch the magic happen! โจ

๐ค 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:
๐ License
MIT - Free and open source forever!