Skip to content

Commit e23fbeb

Browse files
committed
chore: add logger information
1 parent 658488d commit e23fbeb

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,26 @@ Jobs must:
333333
- Implement the `execute` method
334334
- Be exported as default
335335

336+
## Logging
337+
338+
You can pass a logger to the queue manager for debugging or monitoring. The logger must be compatible with the [pino](https://github.com/pinojs/pino) interface.
339+
340+
```typescript
341+
import { pino } from 'pino'
342+
343+
const config = {
344+
default: 'redis',
345+
adapters: {
346+
/* ... */
347+
},
348+
logger: pino(),
349+
}
350+
351+
await QueueManager.init(config)
352+
```
353+
354+
By default, a simple console logger is used that only outputs warnings and errors.
355+
336356
## Benchmarks
337357

338358
Performance comparison with BullMQ using realistic jobs (5ms simulated work per job):

0 commit comments

Comments
 (0)