Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/luis-codex/lc-elysia-logger
Efficient Logging Middleware Designed for Elysia Web Framework
https://github.com/luis-codex/lc-elysia-logger
bun bunjs elysia elysiajs logger logging middleware web
Last synced: 15 days ago
JSON representation
Efficient Logging Middleware Designed for Elysia Web Framework
- Host: GitHub
- URL: https://github.com/luis-codex/lc-elysia-logger
- Owner: luis-codex
- License: mit
- Created: 2023-10-09T15:01:15.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2023-10-11T00:09:57.000Z (about 1 year ago)
- Last Synced: 2024-12-13T11:36:49.876Z (21 days ago)
- Topics: bun, bunjs, elysia, elysiajs, logger, logging, middleware, web
- Language: TypeScript
- Homepage: https://npmjs.com/lc-elysia-logger
- Size: 87.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# lc-elysia-logger
## Installation
```bash
bun add lc-elysia-logger
```## Usage
```js
import { lcLogger } from 'lc-elysia-logger';
import { Elysia } from 'elysia';const app = new Elysia()
.use(lcLogger())
.group('lc-elysia-logger', (api) =>
api
.get('/', () => ({ message: 'API' }))
.post('/', () => ({ message: 'API' }))
.put('/', () => ({ message: 'API' }))
.delete('/', () => ({ message: 'API' }))
.patch('/', () => ({ message: 'API' }))
.options('/', () => ({ message: 'API' }))
.head('/', () => ({ message: 'API' }))
)
.listen(3000);console.log(` - API is running at ${app.server?.hostname}:${app.server?.port}`);
```
## Result
![Result logger](https://github.com/luis-tenorio-code/lc-elysia-logger/blob/master/example.png?raw=true)