mirror of
https://github.com/HeyPuter/puter.git
synced 2026-05-04 16:40:41 +00:00
devex: misc. log cleanups
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user