bun add logixlysia
import { Elysia } from 'elysia'
import logixlysia from 'logixlysia'
const app = new Elysia({
name: 'Logixlysia Example'
}).use(
logixlysia({
config: {
showStartupMessage: true,
startupMessageFormat: 'simple',
timestamp: {
translateTime: 'yyyy-mm-dd HH:MM:ss'
},
ip: true,
logFilePath: './logs/example.log',
customLogFormat:
'π¦ {now} {level} {duration} {method} {pathname} {status} {message} {ip} {epoch}',
logFilter: {
level: ['ERROR', 'WARNING'],
status: [500, 404],
method: 'GET'
}
}
})
)
app.listen(3000)
Check out the website for more detailed documentation and examples.
Licensed under the MIT License.