Skip to content

Negroni middleware to log with the Gomol log library.

License

Notifications You must be signed in to change notification settings

aphistic/negroni-gomol

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

negroni-gomol

GoDoc Build Status Code Coverage

Negroni middleware to log with the Gomol log library.

Usage

Once gomol is initialized as you'd normally do (see the gomol documentation) you can create the logging middleware for Negroni in one of two ways.

The first way is to just use the current default gomol logger, like so:

import ng "github.com/aphistic/negroni-gomol"

...

n := negroni.New()
n.Use(ng.NewLogger())

If you have a different gomol Base logger you'd like to use instead, you can also use it in this way:

import ng "github.com/aphistic/negroni-gomol"

...

base := gomol.NewBase()

...

n := negroni.New()
n.Use(ng.NewLoggerForBase(base))

About

Negroni middleware to log with the Gomol log library.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages