-
-
Notifications
You must be signed in to change notification settings - Fork 18
Description
Thank you for the great queue worker! I'm currently in the process of integrating into my existing AdonisJS app, which uses pino logger as a built-in solution.
This results in two different style of logging in my app, here is the example:
[ info ] starting HTTP server...
[info] [2025-11-03 00:10:05] [Sidequest] [Engine] : Starting Sidequest using backend @sidequest/postgres-backend
[info] [2025-11-03 00:10:06] [Sidequest] [Worker] : Starting worker with provided configuration...
[00:10:06.892] INFO (30): Sidequest started! Dashboard: http://localhost:undefined
[00:10:06.916] INFO (30): started HTTP server on 0.0.0.0:3333
I would like to somehow swap winston logger with pino logger, but ideally sidequest should support any logger through some sort of adapter.
However I am not sure how to go about this currently, since current code heavily relies on winston logger throughout the codebase: https://github.com/sidequestjs/sidequest/blob/master/packages/core/src/logger.ts
Maybe we could implement an adapter API that is compatible with winston format and make the user write their own adapter? After all, most of the loggers have pretty similar API. For example, the core difference between winston and pino is the order of the arguments.
Which essentially boils down to:
Winston:
logger.info('hello', { message: 'world' })Pino:
logger.info({ message: 'world' }, 'hello')