Adopt '[sys]' prefix and improved format for system-level log rendering
Background
System-level logs are currently emitted as JSON objects, interleaved with per-resource logs, which can be confusing and verbose. The JSON format often repeats resource information and is less readable when mixed with standard resource logs.
Proposal
Adopt a flattened, human-friendly log rendering for system/system-level logs, using a [sys] prefix to clearly distinguish them. Extract only the relevant fields from the JSON, omitting redundant fields that are already clear from the resource context, and render error and command details in a concise, readable format. Avoid dumping raw JSON in the log output.
Suggested Format
[sys] {Message}{: Cmd={Cmd} Args={Args}}{: {error}}
- Omit fields that are missing.
- For multi-line errors, indent or bullet subsequent lines.
- If Cmd/Args are present, include them only if they're relevant and not redundant.
Example Messages
Starting process
[sys] Starting process: Cmd=bla Args=[]
Failed to start process (with error)
[sys] Failed to start process: exec: "bla": executable file not found in $PATH
Failed to start Executable (with error)
[sys] Failed to start Executable: exec: "bla": executable file not found in $PATH
System-level container message with multi-line error
[sys] Failed to start Container (exit code 123):
- writer is closed
- not all requested objects were returned
- only 0 out of 1 containers were successfully started
Example of parsed JSON objects
{
"Executable": "/foo-pwrqgpew",
"Reconciliation": 4,
"Cmd": "bla",
"Args": []
}
{
"Executable": "/foo-pwrqgpew",
"Reconciliation": 4,
"Cmd": "bla",
"Args": [],
"error": "exec: \"bla\": executable file not found in $PATH"
}
{
"Executable": "/foo-pwrqgpew",
"Reconciliation": 4,
"error": "exec: \"bla\": executable file not found in $PATH"
}
{
"Container": "/nginx-duqbgyrt",
"Reconciliation": 9,
"ContainerName": "nginx-duqbgyrt",
"Network": "/aspire-network"
}
{
"Container": "/nginx-duqbgyrt",
"Reconciliation": 16,
"ContainerID": "1f1f348abff1",
"ContainerName": "nginx-duqbgyrt",
"error": "container 'nginx-duqbgyrt' start failed (exit code 123)\nwriter is closed\nnot all requested objects were returned\nonly 0 out of 1 containers were successfully started"
}
Additional notes
- Use the
[sys]prefix for any log line that is the result of a parsed system-level (JSON) log. - Omit resource identifiers from the message if they are already clear from the context (e.g., the UI is already grouping by resource).
- This will reduce confusion and improve log readability when system and application logs are interleaved.
Reference: Clean up system level logs in output
cc @danegsta what are other examples of messages here?