fix: 修复群晖测试时报addSecret undefine错误

This commit is contained in:
xiaojunnuo
2026-03-16 22:51:09 +08:00
parent 0b9933df1e
commit 5eb4aa3a0e
15 changed files with 31 additions and 16 deletions

View File

@@ -19,6 +19,7 @@ export function resetLogConfigure() {
}
resetLogConfigure();
export const logger: ILogger = log4js.getLogger("default") as any;
logger.addSecret = (secret: string) => {};
export function resetLogFilePath(filePath: string) {
logFilePath = filePath;
@@ -106,8 +107,8 @@ export class PipelineLogger implements ILogger {
logger: ILogger;
customWriter!: (text: string) => void;
constructor(name: string, write: (text: string) => void) {
this.customWriter = write;
constructor(name: string, write?: (text: string) => void) {
this.customWriter = write || (() => {});
//@ts-ignore
this.logger = log4js.getLogger(name);
}