This commit is contained in:
xiaojunnuo
2024-10-10 02:15:05 +08:00
parent b5d8935159
commit f0b2a61246
26 changed files with 262 additions and 120 deletions
@@ -17,6 +17,7 @@ import DefaultConfig from './config/config.default.js';
import * as libServer from '@certd/lib-server';
import * as commercial from '@certd/commercial-core';
import * as upload from '@midwayjs/upload';
import { setLogger } from '@certd/acme-client';
process.on('uncaughtException', error => {
console.error('未捕获的异常:', error);
// 在这里可以添加日志记录、发送错误通知等操作
@@ -75,6 +76,11 @@ export class MainConfiguration {
ResetPasswdMiddleware,
]);
//acme setlogger
setLogger((text: string) => {
logger.info(text);
});
logger.info('当前环境:', this.app.getEnv()); // prod
}
}