Chainable API
Fluent interface design allows for elegant method chaining to build complex log messages with ease.
Lightweight Multi-platform Logger
A graceful, chainable, and cross-platform logging solution for modern JavaScript applications
import { logger } from '@shermant/logger'
// Simple logging
logger.info.text('Application started').print()
// Chainable with styling
logger.success
.prefix('✅ SUCCESS')
.text('Database connected successfully')
.detail('Connection established in 150ms')
.print()
// Custom types
logger
.type('custom', ['bgMagenta', 'bold'])
.prefix('CUSTOM')
.text('This is a custom log type')
.print()
// Stream logging for progress
const stream = logger.stream
stream.prefix('📦 Installing').text('packages...').update()
// Multiple invocation methods
const infoLogger = logger.info
infoLogger('Callable syntax')
infoLogger('Multiple', 'parameters', 'supported')
bun add @shermant/logger
npm install @shermant/logger
yarn add @shermant/logger
pnpm add @shermant/logger