Log Message in Structured Format

D

Daniel Okoye

@daniel-okoye

·

Format log messages following structured logging standards.

60 copies0 forks
Format this log message in structured JSON format.

Event to log:
{{event_description}}

Log level: {{log_level}}
Service: {{service}}

Constraints:
- JSON format with specific fields
- Required fields: timestamp, level, message, service
- Optional fields: requestId, userId, duration, error
- Message: max 100 characters, human readable
- Add context fields relevant to the event
- No PII in log messages
- Timestamp in ISO 8601 format

Output the JSON log entry.

Details

Category

Coding

Use Cases

Structured logging designLog format standardizationObservability improvement

Works Best With

claude-opus-4.5gpt-5.2gemini-2.0-flash
Created Updated Shared

Create your own prompt vault and start sharing