
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
A lightweight persistent logger tool using SQLite for storing logs with optional retention and max entries limit.
Canonical URL:
https://alexstevovich.com/a/acidlog-nodejs
Software URL:
https://midnightcitylights.com/software/acidlog-nodejs
Acidlog is a lightweight persistent logger built using SQLite for efficient storage and management of logs. It provides features like automatic log retention, log pruning based on maximum entries, and support for custom loggers.
npm install acidlog
import AcidLog from 'acidlog';
// Create an instance with a custom retention period and max entries limit
const logger = new AcidLog('./logs/logs.db', {
retentionDays: 7,
maxEntries: 5000,
});
// Log entries at different levels
logger.info('System started');
logger.warn('Potential issue detected');
logger.error('Critical error occurred');
// Get the most recent 100 logs
const recentLogs = logger.getRecent(100);
console.log(recentLogs);
// Get logs by level
const errorLogs = logger.getByLevel('error', 50);
console.log(errorLogs);
new AcidLog(filePath, options?)Creates an instance of the AcidLog logger.
filePath (string): Path to the SQLite database file where logs will be stored.options (object, optional):
retentionDays (number): Number of days to retain logs. Default is 5.maxEntries (number): Maximum number of log entries to store. Default is 10000.logger (object): Custom logger to use internally. Default is console.log(options)Records a log entry.
level (string): The log level (e.g., "info", "warn", "error").message (string): The log message.system (string, optional): The subsystem or module name.getRecent(limit = 100)Returns the most recent limit logs.
limit (number): The number of logs to retrieve. Default is 100.getAll()Returns all logs, ordered by timestamp (most recent first).
getByLevel(level, limit = 100)Returns logs filtered by log level (info, warn, error).
level (string): The log level to filter by (e.g., info).limit (number): The number of logs to retrieve. Default is 100.info(message, system = null)Logs an "info" level message.
warn(message, system = null)Logs a "warn" level message.
error(message, system = null)Logs an "error" level message.
createLogger(system = "default")Creates a logger with a specific system or module name.
retentionDays value are automatically deleted.maxEntries value, the oldest logs are deleted to keep the database within the set limit.console.Licensed under the Apache License 2.0.
FAQs
A lightweight persistent logger tool using SQLite for storing logs with optional retention and max entries limit.
The npm package acidlog receives a total of 1 weekly downloads. As such, acidlog popularity was classified as not popular.
We found that acidlog 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.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.