mirror of
https://github.com/crystelf/crystelf-core.git
synced 2025-12-05 18:41:56 +00:00
fix:优化日志输出
This commit is contained in:
parent
b9d57255ef
commit
4fb3e00df5
@ -96,11 +96,11 @@ export class OpenListUtils {
|
|||||||
data: data,
|
data: data,
|
||||||
};
|
};
|
||||||
const response = await axios(config);
|
const response = await axios(config);
|
||||||
this.logger.log('获取文件信息成功..');
|
this.logger.log(`获取文件信息成功: ${filePath}`);
|
||||||
return response.data;
|
return response.data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.logger.error('获取文件信息失败..', error);
|
this.logger.error(`获取文件信息失败: ${filePath}`, error);
|
||||||
throw new Error('获取文件信息失败..');
|
throw new Error(`获取文件信息失败 ${filePath}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -135,13 +135,13 @@ export class OpenListUtils {
|
|||||||
resolve();
|
resolve();
|
||||||
});
|
});
|
||||||
writer.on('error', (error) => {
|
writer.on('error', (error) => {
|
||||||
this.logger.error('下载文件失败', error);
|
this.logger.error(`下载文件失败: ${filePath}`, error);
|
||||||
reject(new Error('下载文件失败..'));
|
reject(new Error(`下载文件失败: ${filePath}`));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.logger.error('下载文件失败..', error);
|
this.logger.error(`下载文件失败: ${filePath}`, error);
|
||||||
throw new Error('下载文件失败..');
|
throw new Error(`下载文件失败: ${filePath}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user