log — Service events / incident records
Structured events emitted by services: timestamp, level, service, code, message, tags, trace id and optional duration.
- Dominio
- operations / observability
- Versión
- 1
- Padre
- — (raíz)
- Clave de registros
events- Separador de lista
,- Archivo
- forks/log/contract.json
Campos por posición
| # | Tipo | Descripción | Parte |
|---|---|---|---|
ts | str | ISO-8601 UTC timestamp | núcleo |
level | enum | (valores: DEBUG, INFO, WARN, ERROR, CRITICAL) | núcleo |
service | str | núcleo | |
code | str | núcleo | |
message | str | núcleo | |
tags | list | (max: 10) | núcleo |
trace | str | (optional: True) | núcleo |
duration_ms | int | (optional: True) | núcleo |
Ejemplo válido
log|n=12|d=20260603|env=staging|host=sima-app-01
2026-06-03T08:00:01Z|INFO|web|HTTP200|GET /dashboard served|user:26|t-1001|42
2026-06-03T08:00:05Z|INFO|worker|JOB_START|LessonJob 64 started stage transcribe|job:64,stage:transcribe|t-1002|
2026-06-03T08:02:11Z|WARN|worker|ASR_SLOW|Whisper took longer than budget|job:64|t-1002|126000
2026-06-03T08:02:12Z|INFO|worker|JOB_STAGE|stage generate started with 16 chunks|job:64,stage:generate|t-1002|
2026-06-03T08:05:40Z|ERROR|llm|NUL_CHAR|NUL character in model output; sanitized|job:64,chunk:7|t-1002|
2026-06-03T08:05:41Z|INFO|worker|MINI_PARSE|150 records parsed, 22 flagged incoherent|job:64|t-1002|310
2026-06-03T08:06:02Z|INFO|verify|WEB_CTX|6 queries, 4 results, 2 usable sources|job:64|t-1002|8900
2026-06-03T08:06:30Z|ERROR|llm|CTX_OVERFLOW|verification prompt exceeds context; truncated|job:64|t-1002|
2026-06-03T08:07:00Z|INFO|worker|JOB_DONE|LessonJob 64 finished|job:64|t-1002|419000
2026-06-03T08:10:15Z|WARN|web|HTTP404|GET /clase/999/ not found|user:12|t-1003|5
2026-06-03T08:12:00Z|CRITICAL|llm|ENDPOINT_DOWN|local API base unreachable; retry scheduled|endpoint:8003|t-1004|
2026-06-03T08:12:30Z|INFO|llm|ENDPOINT_UP|local API base healthy after retry|endpoint:8003|t-1004|
Cárgalo en el playground o valida con mini validate forks/log/fixtures/valid.mini.
Notas de la familia
.mini-log — Service events / incident records#
Prefix: log Version: 1 Parent: — Domain: operations / observability
Structured events emitted by services: timestamp, level, service, code, message, tags, trace id and optional duration.
Record layout#
ts:str | level:enum{DEBUG|INFO|WARN|ERROR|CRITICAL} | service:str | code:str | message:str | tags:list<str>[0..10] | trace:str? | duration_ms:int[0..]?
| # | field | type | notes |
|---|---|---|---|
| 1 | ts |
str |
core; ISO-8601 UTC timestamp |
| 2 | level |
enum{DEBUG|INFO|WARN|ERROR|CRITICAL} |
core |
| 3 | service |
str |
core |
| 4 | code |
str |
core |
| 5 | message |
str |
core |
| 6 | tags |
list<str>[0..10] |
core |
| 7 | trace |
str? |
core; optional |
| 8 | duration_ms |
int[0..]? |
core; optional |
Header keys#
| key | type | required | description |
|---|---|---|---|
d |
str |
no | generation date YYYYMMDD |
env |
str |
no | |
host |
str |
no | |
n |
int |
yes | number of records |
v |
int |
no | contract version |
Example#
log|n=12|d=20260603|env=staging|host=sima-app-01
2026-06-03T08:00:01Z|INFO|web|HTTP200|GET /dashboard served|user:26|t-1001|42
2026-06-03T08:00:05Z|INFO|worker|JOB_START|LessonJob 64 started stage transcribe|job:64,stage:transcribe|t-1002|
…
Fixtures#
fixtures/valid.mini ↔ fixtures/canonical.json (round-trip), fixtures/escaping.mini ↔ fixtures/escaping.json, and the negative cases bad_count.mini, bad_arity.mini, bad_type.mini.
Prompt block#
Generate the transferable specification with mini prompt log.