|
|
|
|
|
by mdaniel
4077 days ago
|
|
When I've heard "structured logging" used, it has been in the context of much more key-value pairs than just having keywords next to values, e.g. Log.Info("customerNum={customerNumber} transactionId={transactionId} state=completed", cN, tID)
or the ever popular logstash-y format: Log.Info(LogState.Add("state", "completed").Add("customerId", customerId).Add("transactionId", transactionId));
where `LogState` would build up a key-value dict and its `ToString` would emit the logstash JSON format.I guess the version that works best depends on the tool that is consuming the log text. |
|