Interface: StructuredQueryLoggerOptions
Defined in: src/observability/StructuredQueryLogger.ts:5
Properties
prefix?
optionalprefix?:string
Defined in: src/observability/StructuredQueryLogger.ts:10
Log badge / prefix.
Defaults to 'prisma:query' to match Prisma's output style, or custom string e.g. 'entityTS:query'.
format?
optionalformat?:LogFormat
Defined in: src/observability/StructuredQueryLogger.ts:18
Structured format:
'prisma': Multi-line format displaying query, duration, and parameters (Prisma default)'compact': Single-line formatted log'json': Structured JSON object for CloudWatch, Datadog, ELK
colorize?
optionalcolorize?:boolean
Defined in: src/observability/StructuredQueryLogger.ts:24
Whether to include ANSI terminal colors.
Defaults to true when output is an interactive terminal (TTY) or not explicitly disabled.
logger?
optionallogger?: (message) =>void
Defined in: src/observability/StructuredQueryLogger.ts:30
Custom output destination callback.
Defaults to console.log (or console.error for failed queries).
Parameters
| Parameter | Type |
|---|---|
message | string |
Returns
void
slowThresholdMs?
optionalslowThresholdMs?:number
Defined in: src/observability/StructuredQueryLogger.ts:36
Execution time threshold in milliseconds above which a query is flagged as slow.
Defaults to 100 ms.