https://github.com/aphistic/negroni-gomol
Negroni middleware to log with the Gomol log library.
https://github.com/aphistic/negroni-gomol
gomol negroni
Last synced: 8 months ago
JSON representation
Negroni middleware to log with the Gomol log library.
- Host: GitHub
- URL: https://github.com/aphistic/negroni-gomol
- Owner: aphistic
- License: mit
- Created: 2016-09-30T21:21:25.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-08T15:28:31.000Z (over 9 years ago)
- Last Synced: 2025-10-12T20:34:58.626Z (8 months ago)
- Topics: gomol, negroni
- Language: Go
- Size: 3.91 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
negroni-gomol
=============
[](https://godoc.org/github.com/aphistic/negroni-gomol)
[](https://travis-ci.org/aphistic/negroni-gomol)
[](http://codecov.io/github/aphistic/negroni-gomol?branch=master)
Negroni middleware to log with the Gomol log library.
Usage
-----
Once gomol is initialized as you'd normally do (see the
[gomol](https://www.github.com/aphistic/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))
```