chore: 敏感数据隐藏输出

This commit is contained in:
xiaojunnuo
2026-02-06 16:49:19 +08:00
parent 9f55c3605a
commit 74400aacc6
2 changed files with 7 additions and 0 deletions

View File

@@ -77,6 +77,8 @@ export type ILogger = {
fatal(message: any, ...args: any[]): void;
mark(message: any, ...args: any[]): void;
addSecret(secret: string): void;
};
const locale = Intl.DateTimeFormat().resolvedOptions().locale;
@@ -106,10 +108,14 @@ export class PipelineLogger implements ILogger {
constructor(name: string, write: (text: string) => void) {
this.customWriter = write;
//@ts-ignore
this.logger = log4js.getLogger(name);
}
addSecret(secret: string) {
if (!secret) {
return;
}
this._secrets.push(secret);
}