Import packages/plugin/src/logging.ts

This commit is contained in:
QQ 2026-11-17 08:47:46 +08:00
parent 738a059178
commit 2946f1d354
1 changed files with 1 additions and 1 deletions

View File

@ -8,7 +8,7 @@ export interface LogSink {
}
const levels: readonly LogLevel[] = ['debug', 'info', 'warn', 'error']
const secretKey = /authorization|cookie|token|secret|private|shared|ciphertext|payload|prompt|source|workspace|output|registrationCode|deviceCode/i
const secretKey = /authorization|cookie|token|secret|password|passphrase|credential|apiKey|private|shared|ciphertext|payload|prompt|source|workspace|output|registrationCode|deviceCode/i
export class SafeLogger {
constructor(private readonly sink: LogSink, private readonly threshold: LogLevel | (() => LogLevel) = 'info') {}