Skip to content

Caravan

A flexible, transport-based TypeScript-first logging system for JavaScript applications.

Caravan screenshot

About Caravan

A small, typed logging library for JavaScript applications. Caravan gives you a core logger with levels, context and pluggable transports, plus a set of transport packages for where the logs actually go.

Every logger needs an id and at least one transport to actually send records somewhere. Log methods exist for each level ( trace , debug , info , warn , error , fatal ) and accept a message, a context object or both.

Context passed to createLogger is merged into every record the logger writes. Child loggers created with inherit pick up the parent's level, transports and context, and can extend the context further without mutating the parent.

A logger can fan a record out to several transports at once. Each transport can define its own level , so it only receives records at or above that level, regardless of the logger's own level.

Middleware runs on every record before it reaches transports, in the order provided, and can transform or drop records (by returning undefined ). Child loggers inherit their parent's middleware. This is useful for redacting sensitive fields, sampling, or enriching records.

Discussion

Sign in to join the discussion.

Loading comments…

Tagged

Alternatives to Caravan

Tools in the same space, ranked by how they are performing in the directory.

Compare all
  • Restoredrill

    Proves your PostgreSQL backups actually restore, before you find out the hard way.

    /Data & Analytics
  • Bolnee Chat

    Chatbot Integration in your Business website.

    Freemium/Developer Tools
  • Shrl Io

    A privacy-first, high-performance, self-hosted URL shortener and traffic analyzer designed for teams and individuals who want full control over their link data.

    /Data & Analytics
  • Pangolin

    Identity-aware VPN and tunneled reverse proxy for remote access based on WireGuard®.

    Open source/Developer Tools
  • lla.ma Apps

    Self-hosted deploy console — your own Vercel.

    Open source/Developer Tools
  • Testate

    Git for your test database.

    /Developer Tools