mirror of
https://github.com/wassname/talk.git
synced 2026-09-10 12:43:11 +08:00
[CORL-540] Logging improvements (#2565)
* fix: enhanced errors around story creation * feat: enhanced child loggers * feat: logging enhancements
This commit is contained in:
committed by
Kim Gardner
parent
741739bc16
commit
64f102e6d4
@@ -21,7 +21,7 @@ export default class Task<T, U = any> {
|
||||
jobOptions = {},
|
||||
queue,
|
||||
}: TaskOptions<T, U>) {
|
||||
this.log = logger.child({ jobName });
|
||||
this.log = logger.child({ jobName }, true);
|
||||
this.queue = new Queue(jobName, queue);
|
||||
this.options = {
|
||||
jobName,
|
||||
@@ -70,7 +70,7 @@ export default class Task<T, U = any> {
|
||||
*/
|
||||
public process() {
|
||||
this.queue.process(async (job: Job<T>) => {
|
||||
const log = this.log.child({ jobID: job.id });
|
||||
const log = this.log.child({ jobID: job.id }, true);
|
||||
|
||||
log.trace("processing job from queue");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user