mirror of
https://github.com/adnanh/webhook.git
synced 2025-05-12 16:44:43 +00:00
Fix #141
This commit is contained in:
parent
c19e514ee9
commit
cfd138c96d
1 changed files with 11 additions and 2 deletions
13
webhook.go
13
webhook.go
|
@ -21,7 +21,7 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
version = "2.6.4"
|
||||
version = "2.6.5"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -152,7 +152,16 @@ func main() {
|
|||
}
|
||||
|
||||
l := negroni.NewLogger()
|
||||
l.ALogger = log.New(os.Stderr, "[webhook] ", log.Ldate|log.Ltime)
|
||||
|
||||
l.SetFormat("{{.Status}} | {{.Duration}} | {{.Hostname}} | {{.Method}} {{.Path}} \n")
|
||||
|
||||
standardLogger := log.New(os.Stdout, "[webhook] ", log.Ldate|log.Ltime)
|
||||
|
||||
if !*verbose {
|
||||
standardLogger.SetOutput(ioutil.Discard)
|
||||
}
|
||||
|
||||
l.ALogger = standardLogger
|
||||
|
||||
negroniRecovery := &negroni.Recovery{
|
||||
Logger: l.ALogger,
|
||||
|
|
Loading…
Add table
Reference in a new issue