
Security News
The Code You Didn't Write Is Still Yours to Defend
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.
@ecopages/logger
Advanced tools
A lightweight, flexible logging library. This logger supports multiple log levels and allows for easy extension and integration into any project.
A lightweight, flexible logging library. This logger supports multiple log levels and allows for easy extension and integration into any project.
INFO, ERROR, WARN, and DEBUG log levels for granular control over logging output.First, import the Logger class from the logger.ts file:
import { Logger } from "./path/to/logger";
Create an instance of the Logger class, optionally specifying a prefix for all log messages:
const logger = new Logger("[my-app]");
Use the logger instance to log messages at different levels:
logger.info("This is an informational message");
logger.warn("This is a warning message");
logger.error("This is an error message");
logger.debug("This is a debug message");
[my-app] This is an informational message
[my-app] This is a warning message
[my-app] This is an error message
[my-app] This is a debug message
Logger(prefix: string): Creates a new logger instance with the specified prefix.info(...args: any[]): Logs an informational message.warn(...args: any[]): Logs a warning message.error(...args: any[]): Logs an error message.debug(...args: any[]): Logs a debug message.To extend the logger with additional functionality, you can subclass the Logger class. For example, to add a method for logging fatal errors:
class ExtendedLogger extends Logger {
fatal(...args: any[]) {
// Custom implementation for fatal errors
}
}
Debugging Instructions
By default, the debugging feature is turned off. To enable it, please add the following line to your .env file:
ECOPAGES_LOGGER_DEBUG=true
FAQs
A lightweight, flexible logging library with color support, timestamps, and timer functionality. This logger supports multiple log levels and allows for easy extension and integration into any project.
We found that @ecopages/logger demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.