From 3a8bab920d83c9863c2a2146127ae90b9c7f227e Mon Sep 17 00:00:00 2001 From: KernelDeimos <7225168+KernelDeimos@users.noreply.github.com> Date: Wed, 15 Oct 2025 18:42:37 -0400 Subject: [PATCH] devex: remove logs that print when uploading --- src/backend/src/filesystem/batch/BatchExecutor.js | 4 +++- src/backend/src/filesystem/hl_operations/hl_write.js | 4 ++-- src/backend/src/filesystem/ll_operations/ll_write.js | 2 +- src/backend/src/modules/puterfs/DatabaseFSEntryService.js | 2 +- src/backend/src/modules/puterfs/lib/PuterFSProvider.js | 1 - src/backend/src/routers/filesystem_api/batch/all.js | 8 ++++---- src/backend/src/services/OperationTraceService.js | 2 +- 7 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/backend/src/filesystem/batch/BatchExecutor.js b/src/backend/src/filesystem/batch/BatchExecutor.js index 605145a23..8309153cc 100644 --- a/src/backend/src/filesystem/batch/BatchExecutor.js +++ b/src/backend/src/filesystem/batch/BatchExecutor.js @@ -26,6 +26,8 @@ const { TeePromise } = require('@heyputer/putility').libs.promise; const { WorkUnit } = require('../../modules/core/lib/expect'); class BatchExecutor extends AdvancedBase { + static LOG_LEVEL = true; + constructor (x, { actor, log, errors }) { super(); this.x = x; @@ -168,7 +170,7 @@ class BatchExecutor extends AdvancedBase { this.counter++; const { log, total, total_tbd, counter } = this; const total_str = total_tbd ? `TBD(>${total})` : `${total}`; - log.noticeme(`Batch Progress: ${counter} / ${total_str} operations`); + log.debug(`Batch Progress: ${counter} / ${total_str} operations`); return result; }); diff --git a/src/backend/src/filesystem/hl_operations/hl_write.js b/src/backend/src/filesystem/hl_operations/hl_write.js index d072c6e41..6d3dfd95f 100644 --- a/src/backend/src/filesystem/hl_operations/hl_write.js +++ b/src/backend/src/filesystem/hl_operations/hl_write.js @@ -312,7 +312,7 @@ class HLWrite extends HLFilesystemOperation { if ( values.thumbnail ) return 'already thumbnail'; const content_type = mime.contentType(target_name); - console.log('CONTENT TYPE', content_type); + this.log.debug('CONTENT TYPE', content_type); if ( ! content_type ) return 'no content type'; if ( ! thumbnails.is_supported_mimetype(content_type) ) return 'unsupported content type'; if ( ! thumbnails.is_supported_size(values.file.size) ) return 'too large'; @@ -346,7 +346,7 @@ class HLWrite extends HLFilesystemOperation { thumbnail_promise.resolve(thumbnailData.url); })(); if ( reason ) { - console.log('REASON', reason); + this.log.debug('REASON', reason); thumbnail_promise.resolve(undefined); // values.file.stream = logging_stream(values.file.stream); diff --git a/src/backend/src/filesystem/ll_operations/ll_write.js b/src/backend/src/filesystem/ll_operations/ll_write.js index f7d63d255..0b592274b 100644 --- a/src/backend/src/filesystem/ll_operations/ll_write.js +++ b/src/backend/src/filesystem/ll_operations/ll_write.js @@ -128,7 +128,7 @@ class LLWriteBase extends LLFilesystemOperation { hashPromise.then(hash => { const svc_event = Context.get('services').get('event'); - console.log('\x1B[36;1m[fs.write]', uuid, hash); + this.log.debug('', { uuid, hash }); svc_event.emit('outer.fs.write-hash', { hash, uuid, }); diff --git a/src/backend/src/modules/puterfs/DatabaseFSEntryService.js b/src/backend/src/modules/puterfs/DatabaseFSEntryService.js index e4dc3becc..55eae047d 100644 --- a/src/backend/src/modules/puterfs/DatabaseFSEntryService.js +++ b/src/backend/src/modules/puterfs/DatabaseFSEntryService.js @@ -496,7 +496,7 @@ class DatabaseFSEntryService extends BaseService { this.flipState_(); this.status = this.constructor.STATUS_READY; - this.log.info( + this.log.debug( `Finished ${queue.length} operations.` ) diff --git a/src/backend/src/modules/puterfs/lib/PuterFSProvider.js b/src/backend/src/modules/puterfs/lib/PuterFSProvider.js index c23b8abbf..40712ddce 100644 --- a/src/backend/src/modules/puterfs/lib/PuterFSProvider.js +++ b/src/backend/src/modules/puterfs/lib/PuterFSProvider.js @@ -885,7 +885,6 @@ class PuterFSProvider extends putility.AdvancedBase { hashPromise.then(hash => { const svc_event = Context.get('services').get('event'); - console.log('\x1B[36;1m[fs.write]', uuid, hash); svc_event.emit('outer.fs.write-hash', { hash, uuid, }); diff --git a/src/backend/src/routers/filesystem_api/batch/all.js b/src/backend/src/routers/filesystem_api/batch/all.js index d687623e8..157d28e14 100644 --- a/src/backend/src/routers/filesystem_api/batch/all.js +++ b/src/backend/src/routers/filesystem_api/batch/all.js @@ -146,7 +146,7 @@ module.exports = eggspress('/batch', { const op_spec = pending_operations[i]; if ( ! operation_requires_file(op_spec) ) { indexes_to_remove.push(i); - log.info(`executing ${op_spec.op}`); + log.debug(`executing ${op_spec.op}`); response_promises[i] = batch_exe.exec_op(req, op_spec); } else { } @@ -258,7 +258,7 @@ module.exports = eggspress('/batch', { }); busboy.on('close', () => { - log.info('busboy close'); + log.debug('busboy close'); still_reading.resolve(); }); @@ -274,11 +274,11 @@ module.exports = eggspress('/batch', { return; } - log.info('waiting for operations') + log.debug('waiting for operations') let responsePromises = response_promises; // let responsePromises = batch_exe.responsePromises; const results = await Promise.all(responsePromises); - log.info('sending response'); + log.debug('sending response'); frame.done(); diff --git a/src/backend/src/services/OperationTraceService.js b/src/backend/src/services/OperationTraceService.js index 10f49aa46..91f380be6 100644 --- a/src/backend/src/services/OperationTraceService.js +++ b/src/backend/src/services/OperationTraceService.js @@ -264,7 +264,7 @@ class OperationTraceService { add_frame_sync (label, x) { if ( x ) { - this.log.noticeme( + this.log.debug( 'add_frame_sync() called with explicit context: ' + x.describe() );