Here is an example of a great log message in the "cause" section below:
It covers:
aws autoscaling terminate-instance-in-auto-scaling-group --instance-id i-0196831f293cc4677 --should-decrement-desired-capacity
{
"Activity": {
"Description": "Terminating EC2 instance: i-0196831f293cc4677",
"ActivityId": "8468db2f-7127-4930-b95f-b8de05de9e64",
"Details": "{\"Subnet ID\":\"subnet-e0908d97\",\"Availability Zone\":\"us-east-1b\"}",
"StartTime": "2016-10-11T18:26:50.564Z",
"Progress": 0,
"Cause": "At 2016-10-11T18:26:50Z instance i-0196831f293cc4677 was taken out of service in response to a user request, shrinking the capacity from 4 to 3.",
"StatusCode": "InProgress"
}
}
This type of message is motivated by understandability-as-a-design-goal, since it helps with the understandability of the overall system. Consider that these types of logs could be part of the user-facing part of the system, not just external to the system. For example, they could be shown in an admin interface, as opposed to only being available in a log aggregation tool.