mirror of
https://github.com/HeyPuter/puter.git
synced 2026-08-26 07:57:10 +00:00
devex: remove logs that print when uploading
This commit is contained in:
@@ -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;
|
||||
});
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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('<fs.write>', { uuid, hash });
|
||||
svc_event.emit('outer.fs.write-hash', {
|
||||
hash, uuid,
|
||||
});
|
||||
|
||||
@@ -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.`
|
||||
)
|
||||
|
||||
|
||||
@@ -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,
|
||||
});
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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()
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user