Introduction

uloki — Loki logging transport for Nitro, Nuxt, and Elysia

uloki is a Loki logging transport for modern JavaScript server frameworks. Ship structured logs from your Nitro, Nuxt, or Elysia server to Grafana Loki with automatic batching, configurable redaction, and zero runtime overhead when disabled.

The name comes from ulo (Javanese for snake 🐍) + loki (Grafana Loki).

Features

  • Auto-batching — Buffers log entries and flushes in configurable batches
  • Redaction — Built-in sensitive field detection + custom regex rules
  • Request logging — Automatic HTTP request metadata capture in logfmt format
  • Multi-framework — Drop-in plugins for Nitro, Nuxt, and Elysia
  • Type-safe — Full TypeScript support with exported types
  • Zero-overhead disabled — No HTTP calls when enabled: false

Packages

PackageDescription
ulokiCore — logger, transport, redaction, request helpers
@uloki/nitroNitro server plugin
@uloki/nuxtNuxt module
@uloki/elysiaElysia plugin

Quick Start

# Core (programmatic)
pnpm add uloki

# Elysia
pnpm add @uloki/elysia

# Nitro
pnpm add @uloki/nitro

# Nuxt
pnpm add @uloki/nuxt

Next Steps

On this page