All Versions
7
Latest Version
Avg Release Cycle
425 days
Latest Release
1607 days ago
Changelog History
Changelog History
-
v2.0.2 Changes
July 17, 2020๐ Fixed
- ๐ Fixed Go module name for v2
-
v2.0.1 Changes
May 25, 2020๐ Fixed
- Recovery middleware now checks that
Formatter
is notnil
before calling
- Recovery middleware now checks that
-
v2.0.0 Changes
May 25, 2020๐ Changed
- ๐จ
Recovery.PrintStack
, when false, now also supresses the panic message in addition to supressing the stack trace
๐ Fixed
Negroni.With()
now copies handlers to avoid mutating the originalNegroni
instance ifUse
is called on the newNegroni
instance
โ Added
- ๐
Recovery.LogStack
was added to control whether the stacktrace is logged for panics
๐ Changed
- ๐จ
-
v1.0.0 Changes
September 01, 2018๐ Fixed
Logger
middleware now correctly handles paths containing a%
instead of trying to treat it as a format specifier
-
v0.3.0 Changes
November 11, 2017โ Added
- ๐
With()
helper for building a newNegroni
struct chaining handlers from
existingNegroni
structs - ๐ง Format log output in
Logger
middleware via a configurabletext/template
0๏ธโฃ string injectable via.SetFormat
. AddedLoggerDefaultFormat
and
๐งLoggerDefaultDateFormat
to configure the default template and date format
๐ used by theLogger
middleware. - ๐ Support for HTTP/2 pusher support via
http.Pusher
interface for Go 1.8+. WrapFunc
to converthttp.HandlerFunc
into anegroni.Handler
- ๐ง
Formatter
field added toRecovery
middleware to allow configuring how
0๏ธโฃpanic
s are output. Default ofTextFormatter
(how it was output in
0.2.0
) used.HTMLPanicFormatter
also added to allow easy outputing of
panic
s as HTML.
๐ Fixed
Written()
correct returnsfalse
if no response header has been written- Only implement
http.CloseNotifier
with thenegroni.ResponseWriter
if the
underlyinghttp.ResponseWriter
implements it (previously would always
implement it and panic if the underlyinghttp.ResponseWriter
did not.
๐ Changed
- 0๏ธโฃ Set default status to
0
in the case that no handler writes status -- was
previously200
(in 0.2.0, before that it was0
so this reestablishes that
behavior) - Catch
panic
s thrown by callbacks provided to theRecovery
handler - Recovery middleware will set
text/plain
content-type if none is set ALogger
interface to allow custom logger outputs to be used with the
Logger
middleware. Changes embeded field innegroni.Logger
fromLogger
toALogger
.- 0๏ธโฃ Default
Logger
middleware output changed to be more structure and verbose
๐ (also now configurable, seeAdded
) - Automatically bind to port specified in
$PORT
in.Run()
if an address is
not passed in. Fall back to binding to:8080
if no address specified
0๏ธโฃ (configuable viaDefaultAddress
). - โจ
PanicHandlerFunc
added toRecovery
middleware to enhance custom handling
ofpanic
s by providing additional information to the handler including the
stack and thehttp.Request
.Recovery.ErrorHandlerFunc
was also added, but
๐ deprecated in favor of the newPanicHandlerFunc
.
- ๐
-
v0.2.0 Changes
May 10, 2016โ Added
- ๐ Support for variadic handlers in
New()
- โ Added
Negroni.Handlers()
to fetch all of the handlers for a given chain - ๐ Allowed size in
Recovery
handler was bumped to 8k Negroni.UseFunc
to push another handler onto the chain
๐ Changed
- Set the status before calling
beforeFuncs
so the information is available to them - 0๏ธโฃ Set default status to
200
in the case that no handler writes status -- was previously0
- Panic if
nil
handler is given tonegroni.Use
- ๐ Support for variadic handlers in
-
v0.1.0 Changes
July 22, 2013โ Added
- ๐ Initial implementation.
๐ [Unreleased]: https://github.com/urfave/negroni/compare/v0.2.0...HEAD