tanishqmanuja / nice-logger

🪵 Nice logger for Elysia
https://www.npmjs.com/package/@tqman/nice-logger
MIT License
7 stars 0 forks source link

Features: timestamp and server listening log #1

Closed Xu-pixel closed 2 days ago

Xu-pixel commented 2 days ago

Thank you for your awesome works very much, Would you happen to have the time and capacity to add timestamps and server startup identifiers? like logixlysia do. I would greatly appreciate it

image

tanishqmanuja commented 2 days ago

Sure, would look something like this. (ref: 7cfede2279d3f9fa0bce3e565fe95bb256f5e179) image

Starting from v1.0.2 you can configure to print timestamp or banner like this

const app = new Elysia()
  .use(
    logger({
      mode: "live",
      withBanner: true,
      withTimestamp: true,
    }),
  )
  .listen(3000)
Xu-pixel commented 2 days ago

wow!You are a generous and highly efficient programmer.Thank you very much!I think this is the most suitable elysia logger for me now.