Skip to content

LoggicalUniversal Logging Library

Advanced logging that works everywhere - Node.js, browser, with beautiful formatting

Loggical

Quick Example ​

typescript
import { serverLogger } from 'loggical'

const apiLogger = serverLogger.withPrefix('API')
const requestLogger = apiLogger.withContext({
  requestId: 'req-123',
  userId: 'user-456'
})

requestLogger.info('Request processed', {
  method: 'POST',
  url: '/api/users',
  duration: '125ms',
  status: 'success'
})

// Output: 14:32:18.456 â„šī¸ [API] Request processed { 
//   requestId: "req-123", userId: "user-456", method: "POST", 
//   url: "/api/users", duration: "125ms", status: "success" 
// }

Installation ​

bash
pnpm add loggical
bash
npm install loggical
bash
yarn add loggical

Why Loggical? ​

Before (Standard Logging) ​

2025-01-28T14:32:18.456Z INFO [TASK-EXECUTION-ENGINE] Task completed {
  "executionId": "c97896a8-af4f-4bc6-97fc-6bc851ad573c",
  "duration": 1250,
  "status": "success"
}

After (Loggical) ​

14:32:18.456 â„šī¸ [TASK-ENG] Task completed { 
  executionId: "c97896a8...", duration: 1250ms, status: "success" 
}

70% less visual noise while preserving all essential information.

Released under the MIT License.