@vscode-logging/logger
Logger Library for VSCode Extensions
This package has a good security score with no known vulnerabilities.
Community Reviews
Solid, purpose-built logging for VSCode extensions with minimal overhead
The library doesn't handle sensitive data masking automatically, so you need to be careful about what you pass to log methods - it will happily output authentication tokens or API keys if you're not careful with structured parameters. Error stack traces are logged verbatim, which is useful for debugging but requires deliberate sanitization in production scenarios. The lack of built-in PII filtering means you're responsible for implementing your own safeguards.
Input validation is basic but adequate - the logger won't crash on null/undefined but also doesn't enforce type safety strictly. The Apache 2.0 license is permissive and well-understood. For VSCode extension development specifically, this is a practical choice that avoids bloat while providing necessary functionality.
Best for: VSCode extension developers who need straightforward logging with minimal dependencies and are willing to handle sensitive data filtering themselves.
Avoid if: You need automated PII redaction, regulatory compliance features, or plan to log extensively structured data with sensitive fields.
Solid logging foundation for VSCode extensions with sensible defaults
The library shines in production use with its log source tracking feature that automatically captures file/line information, making debugging extension issues much easier. Memory footprint is negligible, and there's no observable performance impact even with verbose logging enabled. The lazy initialization pattern means channels aren't created until first use, which is good for resource management.
One gotcha: the breaking change from 1.x to 2.x altered the initialization API, requiring migration work. The library lacks built-in log rotation or filtering mechanisms beyond level control, so you're relying on VSCode's output channel behavior. For extensions with heavy logging needs, you'll want to implement your own throttling. Overall, it does exactly what it promises without overengineering.
Best for: VSCode extension developers who need structured logging with source tracking and native OutputChannel integration.
Avoid if: You need advanced features like log aggregation, remote transport, or complex filtering beyond basic log levels.
Well-designed logging for VSCode extensions with minimal friction
The real value shows up during debugging. Log levels work as expected (trace, debug, info, warn, error, fatal), and logs appear in VSCode's Output panel exactly where users expect them. Child loggers are useful for namespacing different parts of your extension. Error messages are clear when you misconfigure something, like forgetting to initialize the logger.
Documentation is functional but minimal—mostly README-based with code examples. The GitHub repo has reasonable issue response times. For such a focused package, the lack of extensive tutorials isn't a dealbreaker since the API is intuitive. One gotcha: you need to understand VSCode's extension context lifecycle to avoid initialization timing issues.
Best for: VSCode extension developers who want structured logging without reinventing the wheel or managing output channels manually.
Avoid if: You need complex logging features like custom formatters, remote logging, or use outside VSCode extensions.
Sign in to write a review
Sign In