getDefaultMidwayLoggerConfig报错;解决方法。

 

解决方案:配置环境变量:MIDWAY_LOGGER_WRITEABLE_DIR

 

源码是:

 

getDefaultMidwayLoggerConfig(appInfo) {
var _a;
const isDevelopment = (0, util_1.isDevelopmentEnvironment)(appInfo.env);
const logRoot = (_a = process.env['MIDWAY_LOGGER_WRITEABLE_DIR']) !== null && _a !== void 0 ? _a : appInfo.root;
if (!logRoot) {
throw new Error('Midway Logger requires a root path during initialization, but it was provided empty. Please set it manually in the "logger.default.dir" configuration.');
}

 

posted on 2025-09-19 18:58  袜子破了  阅读(5)  评论(0)    收藏  举报