Closed xkeshav closed 1 month ago
Thanks for letting me know! This error just means that you need to import it as pinoLogger
now instead of logger
:
-import { logger } from "hono-pino"
+import { pinoLogger } from "hono-pino"
I will update the template soon to reflect.
On another note, pino does a lot of node.js specific things, so I've been looking into another library logtape that support other runtimes, not just node.js - eventually I might add a built in middleware to stoker that uses logtape and then we can remove the dependency on pino.
Thanks, it worked.
I was trying with logtap when you suggested.
import { configure, getConsoleSink, getLogger } from "@logtape/logtape";
await configure({
sinks: { console: getConsoleSink() },
loggers: [{ category: "my-app", level: "debug", sinks: ["console"] }]
});
export default function loggerTap() {
return getLogger(["my-app"])
}
and later
app.use("*", loggerTap());
but it gived typing issue ( which is because AppBindings belongs to pinoLogger ) but what are for this logger.
below is the screenshot which also throw warning in terminal too.
First of All Thank you very much for the awesome video tutorial.
while was going and rsetructuring up my hono server and learnt many good things. that pino-logger thing; I was tring but it is giving deprectaion error
can you help what changes I requires the pino-logger.ts file in order to work it well in production also.