Any thoughts if the concept of a message template would add value to JSON
Template Layout? Heavily inspired by Serilog:
https://ikeptwalking.com/structured-logging-using-serilog/https://blog.rsuter.com/logging-with-ilogger-recommendations-and-best-practices/https://benfoster.io/blog/serilog-best-practices/
Two examples playing around with syntax:
"message" : "Engine Started at 09/28/2016 23:28:51, restart scheduled for
09/29/2016 23:28:51","message_template" : "Engine started at {TimeOfStart},
restart scheduled for {TimeOfRestart}","message_template_hash" :
"152d8ea","message_fields" : { "TimeOfStart" :
"2016-09-28T23:28:51.224+10:00", "TimeOfStart" :
"2016-09-29T23:28:51.224+10:00"}
"message.template" : "Engine started at {}, restart scheduled for
{}","message.template.hash" : "152d8ea","message.args" : [
"2016-09-28T23:28:51.2247447+10:00", "2016-09-29T23:28:51.2247447+10:00"]
In the second example message is omitted on purpose because we want the
structured version. When looking for occurrences of the same event you could
search for a short value without having to use wildcards or regex. Hash seems
complex, it could be replaced by a marker at the call site.