DoubleTie Logger

A lightweight, customizable logging utility for Node.js and TypeScript applications with structured logging capabilities, error handling utilities, and redirection features.

Introduction

The DoubleTie Logger is a flexible and powerful logging utility designed for TypeScript and Node.js applications. It provides structured logging with configurable levels, color-coded output, utilities for error handling with the Result pattern, and features to redirect console and Next.js logging.

Installation

Install the package using your preferred package manager:

# Using npm
npm install @doubletie/logger
 
# Using pnpm
pnpm add @doubletie/logger
 
# Using yarn
yarn add @doubletie/logger

Documentation Sections

Key Features

  • Configurable Log Levels - Control verbosity with error, warn, info, and debug levels
  • Structured Logging - Pass structured data alongside log messages for better analysis
  • Color-Coded Output - Visual distinction between log levels in terminal output
  • Result Pattern Integration - Seamless logging with the Result/Either pattern
  • Console Redirection - Unify all console.log calls through your logger
  • Next.js Integration - Capture framework logs in your logging system
  • OpenTelemetry Support - Create spans and traces for performance monitoring
  • Custom Formatters - Define how log messages are formatted
  • Extensible API - Create domain-specific loggers with extended functionality

On this page

doubletie.com