[CORL-540] Logging improvements (#2565)

* fix: enhanced errors around story creation

* feat: enhanced child loggers

* feat: logging enhancements
This commit is contained in:
Wyatt Johnson
2019-09-18 13:07:42 -04:00
committed by Kim Gardner
parent 741739bc16
commit 64f102e6d4
39 changed files with 318 additions and 135 deletions
+2 -2
View File
@@ -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");