mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-11 12:09:03 +00:00
Establish the structured-log foundation that downstream modules consume: - LogStage union (intake|route|auth|dispatch|upstream|transform|respond|cleanup) - AsyncLocalStorage-backed log-context for end-to-end requestId propagation - Logger.stage() emit helper with optional latencyMs and structured metadata - Extended log-redaction patterns for proxy-authorization, x-goog-api-key, oauth-code, refresh-token classes; Bearer/Basic/Token value-shape masking - Public exports: getRecentLogEntries, withRequestContext, runWithRequestId, getRequestId Refs #1141, #1138
38 lines
1021 B
TypeScript
38 lines
1021 B
TypeScript
export { createLogger } from './logger';
|
|
export type { Logger, StageOptions } from './logger';
|
|
export { getResolvedLoggingConfig, invalidateLoggingConfigCache } from './log-config';
|
|
export { readLogEntries, readLogSourceSummaries, normalizeLogQueryLevel } from './log-reader';
|
|
export { pruneExpiredLogArchives } from './log-storage';
|
|
export {
|
|
ensureLoggingDirectories,
|
|
getCurrentLogPath,
|
|
getLegacyCliproxyLogsDir,
|
|
getLogArchiveDir,
|
|
getNativeLogsDir,
|
|
isPathInsideDirectory,
|
|
} from './log-paths';
|
|
export { getRecentLogEntries, clearRecentLogEntries } from './log-buffer';
|
|
export {
|
|
withRequestContext,
|
|
runWithRequestId,
|
|
getRequestContext,
|
|
getRequestId,
|
|
mergeRequestContext,
|
|
} from './log-context';
|
|
export type { RequestContext } from './log-context';
|
|
export {
|
|
LOG_LEVELS,
|
|
LOG_STAGES,
|
|
shouldWriteLogLevel,
|
|
isLoggingLevel,
|
|
isLogStage,
|
|
} from './log-types';
|
|
export type {
|
|
LogEntry,
|
|
LogErrorInfo,
|
|
LogSourceSummary,
|
|
LogStage,
|
|
LoggingLevel,
|
|
ReadLogEntriesOptions,
|
|
} from './log-types';
|