Code Monkey home page Code Monkey logo

lg's People

Contributors

c2h5oh avatar etsangsplk avatar hugows avatar vojtechvitek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lg's Issues

Example not building with Go 1.9

I haven't understood what happened yet, but will try again on a later time. Anyway:

hugo@hp ~/play/lg/_example $ go run main.go 
# command-line-arguments
./main.go:55:34: cannot use r (type *chi.Mux) as type context.Context in argument to chi.ServerBaseContext:
	*chi.Mux does not implement context.Context (missing Deadline method)
./main.go:55:34: cannot use serverCtx (type context.Context) as type http.Handler in argument to chi.ServerBaseContext:
	context.Context does not implement http.Handler (missing ServeHTTP method)

pressly/chi import

This package still imports github.com/pressly/chi/middleware, but that has been renamed to github.com/go-chi/chi/middleware. Is this package abandoned?

Feature Enhancement: Avoid request started log lines

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.