Skip to content

Latest commit

Β 

History

1,119 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🦊 Logixlysia

Logixlysia is a logging library for ElysiaJS Logixlysia

πŸ“© Installation

bun add logixlysia

πŸ“ Usage

import { Elysia } from 'elysia'
import logixlysia from 'logixlysia' // or import { logixlysia } from 'logixlysia'

const app = new Elysia({
  name: 'Elysia with Logixlysia'
})
  .use(
    logixlysia({
      config: {
        service: 'api-server',
        showStartupMessage: true,
        startupMessageFormat: 'banner',
        showContextTree: true,
        contextDepth: 2,
        slowThreshold: 500,
        verySlowThreshold: 1000,
        timestamp: {
          translateTime: 'yyyy-mm-dd HH:MM:ss.SSS'
        },
        ip: true
      }
    })
  )
  .get('/', () => {
    return { message: 'Welcome to Basic Elysia with Logixlysia' }
  })

app.listen(3000)

✨ Features

  • Request context: accumulate fields with mergeContext into a context tree. Docs
  • Presets: dev, prod, and json output. Docs
  • File logging: writes to disk with rotation by size, age, or count. Docs
  • Adapters: nine built-in destinations, Axiom, Better Stack, ClickHouse, Datadog, HyperDX, Loki, OTLP, PostHog, and Sentry. Docs
  • Sampling: head and tail sampling controls log volume. Docs
  • Enrichers: add trace, user agent, geo, and size fields to every request. Docs
  • Redaction: autoRedact masks PII by pattern; logixlysia/desertant adds neural redaction. Config docs, Neural redaction docs
  • Structured errors: HttpError carries why, fix, and link. Docs
  • Request IDs: read from the incoming request or generated for every request. Docs
  • OpenTelemetry: trace correlation and AI usage metrics on the access log. Docs
  • WebSocket logging: lifecycle logs via wrapWs. Docs

πŸ“š Documentation

Check out the website for more detailed documentation and examples.

πŸ“„ License

Licensed under the MIT License.

About

🦊 Logixlysia is a logger for ElysiaJS

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

269 stars

Watchers

2 watching

Forks

Releases

Sponsor this project

Used by

Contributors

Languages