@@ -12,8 +12,8 @@ description: Logging protocol schemas
1212## TypeScript Usage
1313
1414``` typescript
15- import { ConsoleDestinationConfigSchema , ExtendedLogLevelSchema , ExternalServiceDestinationConfigSchema , FileDestinationConfigSchema , HttpDestinationConfigSchema , LogDestinationSchema , LogDestinationTypeSchema , LogEnrichmentConfigSchema , LoggingConfigSchema , StructuredLogEntrySchema } from ' @objectstack/spec/system' ;
16- import type { ConsoleDestinationConfig , ExtendedLogLevel , ExternalServiceDestinationConfig , FileDestinationConfig , HttpDestinationConfig , LogDestination , LogDestinationType , LogEnrichmentConfig , LoggingConfig , StructuredLogEntry } from ' @objectstack/spec/system' ;
15+ import { ConsoleDestinationConfigSchema , ExtendedLogLevelSchema , ExternalServiceDestinationConfigSchema , FileDestinationConfigSchema , HttpDestinationConfigSchema , LogDestinationSchema , LogDestinationTypeSchema , LogEnrichmentConfigSchema , LogEntrySchema , LogFormatSchema , LogLevelSchema , LoggerConfigSchema , LoggingConfigSchema , StructuredLogEntrySchema } from ' @objectstack/spec/system' ;
16+ import type { ConsoleDestinationConfig , ExtendedLogLevel , ExternalServiceDestinationConfig , FileDestinationConfig , HttpDestinationConfig , LogDestination , LogDestinationType , LogEnrichmentConfig , LogEntry , LogFormat , LogLevel , LoggerConfig , LoggingConfig , StructuredLogEntry } from ' @objectstack/spec/system' ;
1717
1818// Validate data
1919const result = ConsoleDestinationConfigSchema .parse (data );
@@ -164,6 +164,66 @@ Log enrichment configuration
164164
165165---
166166
167+ ## LogEntry
168+
169+ ### Properties
170+
171+ | Property | Type | Required | Description |
172+ | :--- | :--- | :--- | :--- |
173+ | ** timestamp** | ` string ` | ✅ | ISO 8601 timestamp |
174+ | ** level** | ` Enum<'debug' \| 'info' \| 'warn' \| 'error' \| 'fatal'> ` | ✅ | Log severity level |
175+ | ** message** | ` string ` | ✅ | Log message |
176+ | ** context** | ` Record<string, any> ` | optional | Structured context data |
177+ | ** error** | ` Record<string, any> ` | optional | Error object if present |
178+ | ** traceId** | ` string ` | optional | Distributed trace ID |
179+ | ** spanId** | ` string ` | optional | Span ID |
180+ | ** service** | ` string ` | optional | Service name |
181+ | ** component** | ` string ` | optional | Component name (e.g. plugin id) |
182+
183+ ---
184+
185+ ## LogFormat
186+
187+ Log output format
188+
189+ ### Allowed Values
190+
191+ * ` json `
192+ * ` text `
193+ * ` pretty `
194+
195+ ---
196+
197+ ## LogLevel
198+
199+ Log severity level
200+
201+ ### Allowed Values
202+
203+ * ` debug `
204+ * ` info `
205+ * ` warn `
206+ * ` error `
207+ * ` fatal `
208+
209+ ---
210+
211+ ## LoggerConfig
212+
213+ ### Properties
214+
215+ | Property | Type | Required | Description |
216+ | :--- | :--- | :--- | :--- |
217+ | ** name** | ` string ` | optional | Logger name identifier |
218+ | ** level** | ` Enum<'debug' \| 'info' \| 'warn' \| 'error' \| 'fatal'> ` | optional | Log severity level |
219+ | ** format** | ` Enum<'json' \| 'text' \| 'pretty'> ` | optional | Log output format |
220+ | ** redact** | ` string[] ` | optional | Keys to redact from log context |
221+ | ** sourceLocation** | ` boolean ` | optional | Include file and line number |
222+ | ** file** | ` string ` | optional | Path to log file |
223+ | ** rotation** | ` object ` | optional | |
224+
225+ ---
226+
167227## LoggingConfig
168228
169229Logging configuration
@@ -176,6 +236,8 @@ Logging configuration
176236| ** label** | ` string ` | ✅ | Display label |
177237| ** enabled** | ` boolean ` | optional | |
178238| ** level** | ` Enum<'trace' \| 'debug' \| 'info' \| 'warn' \| 'error' \| 'fatal'> ` | optional | Extended log severity level |
239+ | ** default** | ` object ` | optional | Default logger configuration |
240+ | ** loggers** | ` Record<string, object> ` | optional | Named logger configurations |
179241| ** destinations** | ` object[] ` | ✅ | Log destinations |
180242| ** enrichment** | ` object ` | optional | Log enrichment configuration |
181243| ** redact** | ` string[] ` | optional | Fields to redact |
0 commit comments