devex: misc. log cleanups

This commit is contained in:
KernelDeimos
2025-10-15 17:46:18 -04:00
committed by Eric Dubé
parent b1f70fa63e
commit 0373f20de6
3 changed files with 10 additions and 2 deletions
+1
View File
@@ -16,3 +16,4 @@ Steve Ballmer impression so it's definitely worth it.
- [Boot Sequence](./contributors/boot-sequence.md)
- [Kernel](./Kernel.md)
- [Modules](./contributors/modules.md)
- [Configuring Logs](./log_config.md)
@@ -44,6 +44,8 @@ class BatchExecutor extends AdvancedBase {
this.concurrent_ops = 0;
this.max_concurrent_ops = 20;
this.ops_promise = null;
this.log_batchCommands = (config.logging ?? []).includes('batch-commands');
}
async ready_for_more () {
@@ -66,7 +68,9 @@ class BatchExecutor extends AdvancedBase {
const { expectations } = this;
const command_cls = commands[op.op];
console.log(command_cls, JSON.stringify(op, null, 2));
if ( this.log_batchCommands ) {
console.log(command_cls, JSON.stringify(op, null, 2));
}
delete op.op;
const workUnit = WorkUnit.create();
+4 -1
View File
@@ -19,6 +19,7 @@
// METADATA // {"def":"core.expect"}
const { v4: uuidv4 } = require('uuid');
const global_config = require('../../../config');
/**
* @class WorkUnit
@@ -51,7 +52,9 @@ class WorkUnit {
this.checkpoint_ = null;
}
checkpoint (label) {
console.log('CHECKPOINT', label);
if ( ( global_config.logging ?? [] ).includes('checkpoint') ) {
console.log('CHECKPOINT', label);
}
this.checkpoint_ = label;
}
}