bun add logixlysiaimport { Elysia } from 'elysia'
import logixlysia from 'logixlysia' // or import { logixlysia } from 'logixlysia'
const app = new Elysia({
name: "Elysia with Logixlysia"
})
.use(
logixlysia({
config: {
showStartupMessage: true,
startupMessageFormat: 'simple',
timestamp: {
translateTime: 'yyyy-mm-dd HH:MM:ss.SSS'
},
logFilePath: './logs/example.log',
ip: true,
customLogFormat:
'π¦ {now} {level} {duration} {method} {pathname} {status} {message} {ip}'
}
}))
.get('/', () => {
return { message: 'Welcome to Basic Elysia with Logixlysia' }
})
app.listen(3000)Check out the website for more detailed documentation and examples.
Licensed under the MIT License.
