
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.
@oxog/hyperlog
Advanced tools
Ultra-fast, zero-dependency Node.js logger with advanced features for production use.
npm install @oxog/hyperlog
import hyperlog from '@oxog/hyperlog';
const logger = hyperlog.create({
level: 'info',
pretty: true
});
logger.info('Hello World');
logger.error({ err: new Error('Oops!') }, 'Something went wrong');
const logger = hyperlog.create({
level: 'info', // minimum log level
pretty: true, // pretty print for development
timestamp: true, // include timestamps
hostname: true, // include hostname
pid: true, // include process ID
transports: [], // custom transports
redact: ['password'], // fields to redact
filter: (entry) => true // custom filter function
});
tracedebuginfowarnerrorfatal// Simple messages
logger.info('User logged in');
// With metadata
logger.info({ userId: 123 }, 'User logged in');
// Error logging
logger.error({ err: error }, 'Failed to process');
const requestLogger = logger.child({ requestId: 'abc-123' });
requestLogger.info('Processing request');
// Output includes requestId in all logs
logger.withContext({ userId: 123 }, () => {
logger.info('User action');
// All logs in this scope include userId
});
const timer = logger.startTimer();
// ... do work ...
timer.done({ operation: 'database-query' }, 'Query completed');
// Logs include duration automatically
new ConsoleTransport({
level: 'debug',
pretty: true,
colors: true,
timestamp: 'ISO8601'
})
new FileTransport({
filename: 'app.log',
maxSize: '100MB',
maxFiles: 10,
compress: true,
datePattern: 'YYYY-MM-DD'
})
new HTTPTransport({
url: 'https://logs.example.com',
batchSize: 100,
flushInterval: 5000,
retry: { attempts: 3, delay: 1000 }
})
new StreamTransport({
stream: process.stdout,
format: 'json'
})
const logger = hyperlog.create({
transports: [
new ConsoleTransport({ level: 'debug' }),
new FileTransport({ level: 'info', filename: 'app.log' }),
new FileTransport({ level: 'error', filename: 'error.log' }),
new HTTPTransport({ level: 'warn', url: 'https://logs.example.com' })
]
});
new SyslogTransport({
host: 'localhost',
port: 514,
protocol: 'udp4',
facility: SYSLOG_FACILITY.LOCAL0,
tag: 'myapp',
rfc3164: true
})
app.use(hyperlog.expressLogger({
logger,
excludePaths: ['/health'],
includeBody: true,
includeQuery: true,
includeHeaders: ['user-agent'],
customProps: (req, res) => ({
userId: req.user?.id
})
}));
fastify.register(hyperlog.fastifyLogger({
logger,
excludePaths: ['/metrics'],
includeBody: true
}));
# Pretty print logs
hyperlog pretty app.log
# Tail logs with filtering
hyperlog tail -f app.log --level error --grep "database"
# Analyze log patterns
hyperlog analyze app.log
# Convert formats
hyperlog convert app.log --from json --to csv
# Extract time range
hyperlog extract app.log --from "2024-01-01" --to "2024-01-31"
# Performance analysis
hyperlog perf app.log --slow 1000
Reduce log volume in high-throughput scenarios:
const logger = hyperlog.create({
sampling: {
enabled: true,
rate: 0.1, // Sample 10% of logs
adaptive: true // Automatically adjust rate
}
});
Prevent log flooding:
const logger = hyperlog.create({
rateLimit: {
enabled: true,
maxPerSecond: 1000,
maxBurst: 2000
}
});
Built-in metrics collection:
const logger = hyperlog.create({
metrics: {
enabled: true,
interval: 10000 // Report every 10 seconds
}
});
// Get metrics snapshot
const metrics = logger.getMetrics();
console.log(metrics.counts.total); // Total logs
console.log(metrics.throughput.current); // Current logs/sec
console.log(metrics.topErrors); // Most common errors
Benchmarks on a typical development machine:
MIT © Ersin Koç
FAQs
Ultra-fast, zero-dependency Node.js logger with advanced features
We found that @oxog/hyperlog 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
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.