@utiln/logging
v1.0.2
Published
Logging helpers for the @utiln library
Readme
@utiln/logging
Simple console logging helpers with consistent message formatting.
Install
npm install @utiln/loggingUsage
import { logInfo, logWarn, logError } from '@utiln/logging';
logInfo('server started');
logWarn('cache miss');
logError('connection failed');Example output:
[INFO] Server started
[WARN] Cache miss
[ERROR] Connection failedAPI
| Export | Parameters | Description |
|--------|------------|-------------|
| logInfo | message: string | Writes a capitalized info message to stdout |
| logWarn | message: string | Writes a capitalized warning message to stderr |
| logError | message: string | Writes a capitalized error message to stderr |
Requirements
- Node.js 22+
- ESM (
"type": "module")
