devex: more log reduction

This commit is contained in:
KernelDeimos
2025-10-15 18:53:03 -04:00
committed by Eric Dubé
parent 3a8bab920d
commit cd279f7355
5 changed files with 5 additions and 13 deletions
@@ -295,7 +295,7 @@ class FilesystemService extends BaseService {
[new_path, old_path.length + 1, `${old_path}%`, user_id]);
const log = this.services.get('log-service').create('update_child_paths');
log.info(`updated ${old_path} -> ${new_path}`);
log.debug(`updated ${old_path} -> ${new_path}`);
monitor.end();
}
@@ -86,7 +86,6 @@ class MkdirCommand extends BatchCommand {
});
return;
}
console.log('USING SLOW MKDIR');
const hl_mkdir = new HLMkdir();
const response = await hl_mkdir.run({
@@ -87,8 +87,6 @@ class MkTree extends HLFilesystemOperation {
const dirs = trunk === '.' ? []
: trunk.split('/').filter(Boolean);
console.log('DIRS', dirs, parent_node.selector.describe())
// dirs = [a, b, c]
let parent_did_exist = parent_exists;
@@ -156,8 +154,6 @@ class MkTree extends HLFilesystemOperation {
const bottom_parent = await fs.node(current);
console.log('BOTTOM PARENT', bottom_parent.selector.describe());
if ( branches.length === 0 ) {
this.leaves.push(bottom_parent);
}
@@ -280,7 +276,6 @@ class HLMkdir extends HLFilesystemOperation {
}
let parent_node = values.parent || await fs.node(new RootNodeSelector());
console.log('USING PARENT', parent_node.selector.describe());
let target_basename = _path.basename(values.path);
@@ -459,7 +454,7 @@ class HLMkdir extends HLFilesystemOperation {
const node = await fs.node(current);
if ( ! await node.exists() ) {
console.log('HERE FROM', node.selector.describe(), parent_node.selector.describe());
// console.log('HERE FROM', node.selector.describe(), parent_node.selector.describe());
throw APIError.create('dest_does_not_exist');
}
@@ -477,8 +472,6 @@ class HLMkdir extends HLFilesystemOperation {
* @returns {Promise<FSNodeContext>} The created directory.
*/
async _create_dir (dir) {
console.log('CREATING DIR', dir.selector.describe());
if ( await dir.exists() ) {
if ( ! dir.entry.is_dir ) {
throw APIError.create('dest_is_not_a_directory');
@@ -38,8 +38,6 @@ module.exports = eggspress('/rename', {
subject: new FSNodeParam('path'),
},
}, async (req, res, next) => {
console.log('ACTIVATED THIS ROUTE');
if(!req.body.new_name) {
throw APIError.create('field_missing', null, {
key: 'new_name',
+3 -1
View File
@@ -32,6 +32,8 @@ const MODE_WRITE = Symbol('write');
* allowing concurrent read and exclusive write operations.
*/
class FSLockService extends BaseService {
static LOG_DEBUG = true;
async _construct () {
this.locks = {};
}
@@ -123,7 +125,7 @@ class FSLockService extends BaseService {
this.locks[path] = rwlock;
}
this.log.noticeme('WAITING FOR LOCK: ' + path + ' ' +
this.log.info('WAITING FOR LOCK: ' + path + ' ' +
mode.toString());
if ( mode === MODE_READ ) {