@blyp/core

A high-performance, modular logger with Bun-first runtime detection and TypeScript support. Built on Pino and supports Elysia, Hono, Express, Fastify, NestJS, Next.js App Router, Farm.js, React Router, Astro, Nitro, Nuxt, TanStack Start, SolidStart, and S
4,479 16
Install
npm install @blyp/core
Latest Version:0.1.35
Vue:3
License:MIT
Last Updated:Oct 21, 2026
Links: GitHub  ·  npm
Maintainer: doughnut4641

Blyp Logger

Blyp is a TypeScript logger for standalone apps and modern web frameworks. It gives you structured logging, framework adapters, client-to-server log ingestion, and optional connectors without turning the root README into a full manual.

Bun TypeScript Elysia

Highlights

  • Use it in standalone apps or with framework adapters.
  • Create structured, request-scoped logs with createStructuredLog.
  • Redact common secrets before logs reach output or downstream sinks.
  • Ingest logs from browser and Expo apps into your backend flow.
  • Forward logs to optional connectors such as New Relic, PostHog, Better Stack, Sentry, Databuddy, named HTTP endpoints, and OTLP targets.
  • Built for Bun-first setups with support for supported Node runtimes.
  • Full TypeScript support across the main package and subpath exports.

Installation

bun add @blyp/core

npm install @blyp/core | pnpm add @blyp/core | yarn add @blyp/core

If you use the Expo logger, also install expo-network.

npx expo install expo-network

Quick start

import { logger } from '@blyp/core';

logger.info('Server started', { port: 3000 });
logger.success('Connected to database');
logger.error('Payment failed', { orderId: 'ord_123' });

Structured logs

import { createStructuredLog } from '@blyp/core';

const log = createStructuredLog('checkout', {
  service: 'web-api',
  level: 'info',
  timestamp: new Date().toISOString(),
});

log.set({
  user: { id: 1, plan: 'pro' },
  cart: { items: 3, total: 9999 },
});

log.info('checkout started');
log.emit({ status: 200 });

Inside framework handlers, createStructuredLog(...) binds to the active request logger automatically. The final structured record is written when you call .emit().

Framework example

Blyp supports Elysia, Hono, Express, Fastify, NestJS, Next.js App Router, Farm.js, React Router, Astro, Nitro, Nuxt, TanStack Start, SolidStart, SvelteKit, Cloudflare Workers, and Convex.

import { Elysia } from 'elysia';
import { createLogger } from '@blyp/core/elysia';

const app = new Elysia()
  .use(createLogger({ level: 'info', autoLogging: true }))
  .get('/', () => 'Hello World')
  .listen(3000);

See the framework integration docs for the full adapter matrix and framework-specific examples.

Farm.js

// farm.config.ts
import { defineConfig } from '@farm.js/core';
import { blypPlugin } from '@blyp/core/farmjs';

export default defineConfig({
  plugins: [blypPlugin()],
});
// src/app/api/products/route.ts
import { logger } from '@blyp/core/farmjs';

export async function GET() {
  logger.info('loaded products');
  return Response.json({ ok: true });
}

The plugin automatically records requests, errors, selected Farm lifecycle events, browser navigation and performance telemetry, and browser errors. It currently supports Farm's Node and Bun server runtimes.

Better Auth

Better Auth can be attached as a real Better Auth plugin and then reused by Blyp framework adapters for request enrichment.

import { betterAuth } from 'better-auth';
import { blyp } from '@blyp/core/better-auth';

export const auth = betterAuth({
  plugins: [
    blyp({
      clientLogging: true,
    }),
  ],
});
import { createLogger } from '@blyp/core/nextjs';
import { auth } from './auth';

export const nextLogger = createLogger({
  auth: {
    betterAuth: auth,
  },
});
import { createAuthClient } from 'better-auth/client';
import { blypClient } from '@blyp/core/better-auth';

export const authClient = createAuthClient({
  plugins: [blypClient()],
});

const logger = authClient.blyp.createLogger();
logger.info('mounted');

Clerk

Clerk is integrated through Blyp's shared server auth config instead of a plugin. Blyp authenticates the incoming request with @clerk/backend, normalizes the auth state onto each server log record, and derives browser log identity on the server when your client logger posts to a Blyp endpoint such as /blyp/log.

import { clerk, createClerkClientLogger } from '@blyp/core/clerk';
import { createLogger } from '@blyp/core/nextjs';

export const nextLogger = createLogger({
  auth: {
    clerk: clerk({
      secretKey: process.env.CLERK_SECRET_KEY!,
      publishableKey: process.env.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY!,
      jwtKey: process.env.CLERK_JWT_KEY,
      authorizedParties: ['https://app.example.com'],
    }),
  },
  clientLogging: {
    path: '/blyp/log',
  },
});

export const clientLogger = createClerkClientLogger({
  endpoint: '/blyp/log',
});

See the full Clerk integration docs for Next.js, Express, React Router, and machine-authenticated examples.

More features

Documentation

Development

bun install
bun run test
bun run build
bun run type-check

License

MIT

Storageless ingestion

Use destination: 'none' to forward logs through enabled connectors or OTLP without local log files, database storage, or disk queues. At least one configured connector is required, and ingested client logs must select a ready target. See configuration and client examples.

Operational connector reliability

See the PostHog/Sentry contracts, published-package investigation, and CarsXE migration example for structured errors, verified identity, final-payload privacy, bounded flushing and no-persistence operation. Run npm run test:packed-connectors to verify the packed package with real SDKs in isolated Node CommonJS/ESM applications.

S3 storage

Set destination: 's3' to store compressed log batches in AWS S3, Cloudflare R2, or MinIO and browse them in Studio with explicit read allowances. Memory buffering is the default; persistent SQLite spooling is optional. See S3 storage and Studio for configuration, permissions, recovery, and provider validation status.

Related Packages

vue-logger-plugin

Flexible logging functionality for Vue.js 2 & 3

459,555 29
eslint-plugin-pino-logger

ESLint rule to enforce structured logging with Pino in Nuxt, Next, and general J...

5,000 0
hotelme-nuxt-logger

Стандартний logger для Nuxt проектів з JSON виводом сумісним з бекенд-логами

5,091
vuex-trace

Log actions & mutations in vuex! 🚀

3,401 12
vuelogger

logger by js

439 1

Version History

Version Released Vue License
0.1.35 ^3.0 MIT
0.1.34 ^3.0 MIT
0.1.32 ^3.0 MIT
0.1.31 ^3.0 MIT
0.1.30 ^3.0 MIT
Pre-releases (1)
Version Released Vue License
0.1.25-beta ^3.0 MIT