We use ECS so the default hostname is set to the short-sha of the docker container, which isn't particularly useful. While the server_name can already be set as part of the log entry, it doesn't particularly make sense to create another log hook to add this.
This PR adds support for a SetServerName() method on the logger, alongside SetEnvironment(), SetRelease(), etc. I didn't remove the server_name code from data.go so the change is backwards compatible, if you do want to change the server_name in a log entry.
Coverage increased (+0.3%) to 83.333% when pulling 9955b9142b8f425f662391ab393e1252c7be6c72 on mightyguava:pull into 13ba9278e2adf1537fd94143a6b6a1c0dc008ac7 on evalphobia:master.
Coverage increased (+0.3%) to 83.333% when pulling 9955b9142b8f425f662391ab393e1252c7be6c72 on mightyguava:pull into 13ba9278e2adf1537fd94143a6b6a1c0dc008ac7 on evalphobia:master.
We use ECS so the default hostname is set to the short-sha of the docker container, which isn't particularly useful. While the server_name can already be set as part of the log entry, it doesn't particularly make sense to create another log hook to add this.
This PR adds support for a
SetServerName()
method on the logger, alongsideSetEnvironment()
,SetRelease()
, etc. I didn't remove theserver_name
code fromdata.go
so the change is backwards compatible, if you do want to change theserver_name
in a log entry.