
Research
/Security News
Mini Shai-Hulud Campaign Hits Red Hat Cloud Services npm Packages
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.
@nexe/logger
Advanced tools

# npm
npm install @nexe/logger
# yarn
yarn add @nexe/logger
# pnpm
pnpm add @nexe/logger
# bun
bun add @nexe/logger
import { createLogger, logger } from '@nexe/logger';
// Use global logger
logger.info('Hello, World!');
logger.error('Something went wrong!', { error: 'details' });
// Create named logger
const apiLogger = createLogger('API');
apiLogger.info('API server started');
import { Hono } from 'hono';
import { createLogger } from '@nexe/logger';
const logger = createLogger('app');
logger.info('🚀 Starting Nexe application...');
const app = new Hono();
app.get('/', c => {
return c.text('Hello Nexe!');
});
logger.info('✅ Application ready!');
export default app;
import { createLogger, LogLevel } from '@nexe/logger';
const customLogger = createLogger('MyService', {
level: LogLevel.DEBUG,
transport: {
target: 'pino-pretty',
options: {
colorize: true,
translateTime: 'yyyy-mm-dd HH:MM:ss.l',
},
},
});
customLogger.debug('Debug information');
customLogger.info('Service initialized');
customLogger.warn('Warning message');
customLogger.error('Error occurred');
createLogger(name?, config?)Creates a new logger instance with optional name and configuration.
const logger = createLogger('ServiceName', {
level: LogLevel.INFO,
// ... other options
});
logger (Global Logger)Pre-configured global logger instance.
import { logger } from '@nexe/logger';
logger.info('Global log message');
logger.fatal('Fatal error');
logger.error('Error message');
logger.warn('Warning message');
logger.info('Info message');
logger.debug('Debug message');
logger.trace('Trace message');
// Set context for all subsequent logs
logger.setContext({ requestId: '123', userId: 'user456' });
logger.info('User action performed');
// Create child logger with context
const childLogger = logger.child({ module: 'auth' });
childLogger.info('Authentication successful');
The logger automatically adapts based on NODE_ENV:
import { createLogger, LogLevel } from '@nexe/logger';
const logger = createLogger('MyApp', {
level: LogLevel.INFO,
redact: ['password', 'token'], // Hide sensitive fields
formatters: {
level: (label, number) => ({ level: number }),
bindings: bindings => ({ service: 'MyApp', ...bindings }),
},
serializers: {
req: req => ({ method: req.method, url: req.url }),
res: res => ({ statusCode: res.statusCode }),
},
});
[2025-07-27 14:08:19.149] INFO (MyService): User login successful
[2025-07-27 14:08:19.150] ERROR (Auth): Invalid credentials provided
error: "Invalid username or password"
requestId: "req_123456"
{"level":30,"time":1643299699149,"name":"MyService","msg":"User login successful","requestId":"req_123456"}
{"level":50,"time":1643299699150,"name":"Auth","msg":"Invalid credentials provided","err":{"type":"AuthError","message":"Invalid username or password"}}
import { createConsoleTransport } from '@nexe/logger';
const transport = createConsoleTransport({
colorize: true,
translateTime: 'yyyy-mm-dd HH:MM:ss.l',
});
import { createFileTransport } from '@nexe/logger';
const transport = createFileTransport({
destination: './logs/app.log',
mkdir: true,
});
import { createRotatingFileTransport } from '@nexe/logger';
const transport = createRotatingFileTransport({
filename: './logs/app-%DATE%.log',
frequency: 'daily',
maxSize: '10M',
maxFiles: '7',
});
const logger = createLogger('SecureApp', {
redact: ['password', 'token', 'authorization', 'cookie'],
});
// This will automatically redact sensitive fields
logger.info('User data', {
username: 'john_doe',
password: 'secret123', // This will be redacted
});
All serializers include error handling to prevent logging failures from crashing your application.
import { createLogger, LogLevel } from '@nexe/logger';
// Create test logger with minimal output
const testLogger = createLogger('Test', {
level: LogLevel.WARN, // Only log warnings and errors in tests
});
We welcome contributions! Please see our Contributing Guide for details.
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSE file for details.
Built with ❤️ for the Nexe ecosystem
FAQs
Nexe Logger - A powerful logging solution based on Pino
The npm package @nexe/logger receives a total of 9 weekly downloads. As such, @nexe/logger popularity was classified as not popular.
We found that @nexe/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.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.

Research
/Security News
The North Korean malware loader hides in a Packagist-listed package and its GitHub branch to fetch and execute remote code in a likely Contagious Interview-style lure.

Security News
The Rust project is moving toward formal rules on LLM use in contributions after months of internal debate over maintainer burden, code quality, and contributor experience.