made it so that the Route() methods, of the various routers, will return an error if the receiver is nil. (except for the discard router.)
parent
4afa358cf7
commit
55ae1a2fe6
3
flog.go
3
flog.go
|
@ -22,6 +22,9 @@ func New(router Router, cascade ...interface{}) Flogger {
|
||||||
|
|
||||||
|
|
||||||
func (flogger *internalFlogger) route(message string, moreContext map[string]interface{}) error {
|
func (flogger *internalFlogger) route(message string, moreContext map[string]interface{}) error {
|
||||||
|
if nil == flogger {
|
||||||
|
return errNilReceiver
|
||||||
|
}
|
||||||
|
|
||||||
context := newContext(flogger.context, moreContext)
|
context := newContext(flogger.context, moreContext)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue