Skip to content
This repository was archived by the owner on Mar 23, 2021. It is now read-only.
This repository was archived by the owner on Mar 23, 2021. It is now read-only.

Feature Enhancement: Avoid request started log lines #1

@joelpresence

Description

@joelpresence

Hi,

Thanks for making this great library available!

We are using it and liking it. However, we don't need both a "request started" and "request complete" JSON log line to be logged, we only need the "request complete" line logged.

Is there an easy way to turn off the "request started" log emission? It's being created in NewLogEntry and maybe we could add a flag to supress this?

# Currently, we get two log lines per request in chi
{ ... "msg": "request started" ... }
{ ... "msg": "request complete" ... }

#We want only one log line per request in chi
{ ... "msg": "request complete" ... }

I could also fork this repo, but I'd prefer not to. Is there a reason for the "request started" log line? Given that the "request complete" log entry catches the interesting data wrt timing, and other fields we might add in our own code, I don't see the need for the "request started" line. It is slowing down our code noticeably and we are paying a third party log hosting company by the GB for hosting our logs, so we want to keep them as small as possible ...

The panic middleware will catch any panics, so I don't see any need for the "request started" line.

Any ideas?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions