Closed cocreature closed 3 years ago
valid point, I thought they are included by default :facepalm: I'll fix that.
@cocreature do you think statements like this would be better?
2021-06-14 13:12:56.698 [http-json-ledger-api-akka.actor.default-dispatcher-9] INFO com.daml.http.HttpService - HTTP Server pre-startup , context: {instance_uuid=8e6043de-b004-4630-93c6-7355d15d48a8}
2021-06-14 13:12:56.928 [http-json-ledger-api-akka.actor.default-dispatcher-9] INFO com.daml.http.LedgerClient$ - Attempting to connect to the ledger localhost:6865
(attempt 1/600)
2021-06-14 13:12:58.470 [timer-utils] INFO com.daml.http.LedgerClient$ - Attempting to connect to the ledger localhost:6865
(attempt 2/600)
2021-06-14 13:12:59.474 [timer-utils] INFO com.daml.http.LedgerClient$ - Attempting to connect to the ledger localhost:6865
(attempt 3/600)
2021-06-14 13:13:00.478 [timer-utils] INFO com.daml.http.LedgerClient$ - Attempting to connect to the ledger localhost:6865
With the log encoder being json
it currently looks like this:
{"@timestamp":"2021-06-14T13:14:47.807+02:00","@version":"1","message":"Attempting to connect to the ledger localhost:6865\n (attempt 19/600)","logger_name":"com.daml.http.LedgerClient$","thread_name":"timer-utils","level":"INFO","level_value":20000}
{"@timestamp":"2021-06-14T13:14:48.809+02:00","@version":"1","message":"Attempting to connect to the ledger localhost:6865\n (attempt 20/600)","logger_name":"com.daml.http.LedgerClient$","thread_name":"timer-utils","level":"INFO","level_value":20000}
{"@timestamp":"2021-06-14T13:14:49.811+02:00","@version":"1","message":"Attempting to connect to the ledger localhost:6865\n (attempt 21/600)","logger_name":"com.daml.http.LedgerClient$","thread_name":"timer-utils","level":"INFO","level_value":20000}
From a quick look, we log with %date{"dd-MM-yyyy HH:mm:ss.SSS", UTC}
in other places which seems pretty close to what you’re suggesting. I’d just use the same. Using different logging styles between different apps isn’t helpful to anyone.
Then we'll go with %date{"dd-MM-yyyy HH:mm:ss.SSS", UTC}
:)
If you have multi-day logs times are insufficient.