I am looking at trying to add one or two additional fields to the standard LoggerWithWriter() output.
Example before:
[GIN] 2018/09/26 - 23:30:55 | 204 | 9.908935ms | 10.10.10.1 | DELETE /uri/path
Example of what I'd like to add after:
[GIN] 2018/09/26 - 23:30:55 | 204 | 9.908935ms | 10.52.161.250 | <username or payload information> | DELETE /uri/path
I haven't found a ton of resources in terms of folks overriding this default logger. I see quite a few instances where folks add some middleware to output extra data in addition to this standard logging, but I'd love to see if there's a way to augment the existing log line with additional data.
Thanks in advance for any assistance!
I am looking at trying to add one or two additional fields to the standard
LoggerWithWriter()output.Example before:
[GIN] 2018/09/26 - 23:30:55 | 204 | 9.908935ms | 10.10.10.1 | DELETE /uri/pathExample of what I'd like to add after:
[GIN] 2018/09/26 - 23:30:55 | 204 | 9.908935ms | 10.52.161.250 | <username or payload information> | DELETE /uri/pathI haven't found a ton of resources in terms of folks overriding this default logger. I see quite a few instances where folks add some middleware to output extra data in addition to this standard logging, but I'd love to see if there's a way to augment the existing log line with additional data.
Thanks in advance for any assistance!