
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
npm install spdlog4ts
import {
BasicLogger,
StdoutLogger,
AsyncLogger,
RotatingLogger,
DailyLogger,
HourlyLogger,
EType,
ELevel
} from 'spdlog4ts';
// use the default logger (stdout, multi-threaded, colored)
BasicLogger.level = ELevel.TRACE;
BasicLogger.critical("critical log");
BasicLogger.error("error log");
BasicLogger.warn("warning log");
BasicLogger.info("info log");
BasicLogger.pattern = "*** [%H:%M:%S %z] [thread %t] %v ***";
BasicLogger.debug("debug log");
BasicLogger.trace("trace log");
BasicLogger.info(EType.DAILY, EType.HOURLY);
// force all loggers flush to disk every 3 seconds
BasicLogger.flushEvery(3);
// create a stdout logger
const stdlogger = new StdoutLogger('stdout');
// set log pattern
stdlogger.pattern = ">>>>>>>>> %H:%M:%S %z %v <<<<<<<<<";
// set log level
stdlogger.level = ELevel.TRACE;
stdlogger.trace("stdout logger message");
// create an async logger
const asynclogger = new AsyncLogger('name1', "./logs/async.log");
asynclogger.info("async logger message");
// create a rotating file logger
const rotatinglogger = new RotatingLogger('name2', "./logs/rotating.log",
1024 * 1024 * 100/* 100MB */, 50/* at most 50 files */);
rotatinglogger.info("rotating logger message");
// create a daily file logger
const dailylogger = new DailyLogger('name3', './logs/daily.log');
dailylogger.info("daily logger message");
// create an hourly file logger
const hourlylogger = new HourlyLogger('name4', './logs/hourly.log');
hourlylogger.info("hourly logger message");
const {
BasicLogger,
StdoutLogger,
AsyncLogger,
RotatingLogger,
DailyLogger,
HourlyLogger,
EType,
ELevel
} = require('spdlog4ts');
// use the default logger (stdout, multi-threaded, colored)
BasicLogger.level = ELevel.TRACE;
BasicLogger.critical("critical log");
BasicLogger.error("error log");
BasicLogger.warn("warning log");
BasicLogger.info("info log");
BasicLogger.pattern = "*** [%H:%M:%S %z] [thread %t] %v ***";
BasicLogger.debug("debug log");
BasicLogger.trace("trace log");
BasicLogger.info(EType.DAILY, EType.HOURLY);
// force all loggers flush to disk every 3 seconds
BasicLogger.flushEvery(3);
// create a stdout logger
const stdlogger = new StdoutLogger('stdout');
// set log pattern
stdlogger.pattern = ">>>>>>>>> %H:%M:%S %z %v <<<<<<<<<";
// set log level
stdlogger.level = ELevel.TRACE;
stdlogger.trace("stdout logger message");
// create an async logger
const asynclogger = new AsyncLogger('name1', "./logs/async.log");
asynclogger.info("async logger message");
// create a rotating file logger
const rotatinglogger = new RotatingLogger('name2', "./logs/rotating.log",
1024 * 1024 * 100/* 100MB */, 50/* at most 50 files */);
rotatinglogger.info("rotating logger message");
// create a daily file logger
const dailylogger = new DailyLogger('name3', './logs/daily.log');
dailylogger.info("daily logger message");
// create an hourly file logger
const hourlylogger = new HourlyLogger('name4', './logs/hourly.log');
hourlylogger.info("hourly logger message");
FAQs
Spdlog bindings for Node.js with built-in TypeScript declarations
The npm package spdlog4ts receives a total of 0 weekly downloads. As such, spdlog4ts popularity was classified as not popular.
We found that spdlog4ts demonstrated a not healthy version release cadence and project activity because the last version was released 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.