Skip to content

PunGrumpy/logixlysia

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸฆŠ Logixlysia

Logixlysia is a logging library for ElysiaJS Screenshot of Logixlysia

๐Ÿ“ฉ Installation

bun add logixlysia

๐Ÿ“ Usage

import { Elysia } from 'elysia'
import { logger } from 'logixlysia'

const app = new Elysia({
  name: 'Logixlysia Example'
}).use(
  logger({
    ip: false,
    customLogMessage:
      '๐ŸฆŠ {now} {level} {duration} {method} {pathname} {status} {message} {ip}'
  })
)

app.listen(3000)

๐Ÿ“š Documentation

Options

Option Type Description Default
ip boolean Display the incoming IP address based on the X-Forwarded-For header false
customLogMessage string Custom log message to display ๐ŸฆŠ {now} {level} {duration} {method} {pathname} {status} {message} {ip}
logFilter object Filter the logs based on the level, method, and status null

๐Ÿ“„ License

Licensed under the MIT License.