(ctx: LogContext | undefined)
| 327 | type InternalLogContext = LogContext & { [SESSION_LOG_ID]?: unknown }; |
| 328 | |
| 329 | function stripInternalCtx(ctx: LogContext | undefined): LogContext | undefined { |
| 330 | if (ctx === undefined) return undefined; |
| 331 | if (!(SESSION_LOG_ID in ctx)) return ctx; |
| 332 | const { [SESSION_LOG_ID]: _internal, ...visible } = ctx as InternalLogContext; |
| 333 | return visible; |
| 334 | } |
| 335 | |
| 336 | function makeGlobalSink(config: LoggingConfig): RotatingFileSink | undefined { |
| 337 | if (config.level === 'off') return undefined; |