Logrus logging backend https://github.com/EmileVauge/traefik/issues/15
This commit is contained in:
parent
35a1454082
commit
f5ddbcbcde
11 changed files with 83 additions and 98 deletions
16
adapters.go
16
adapters.go
|
@ -2,25 +2,27 @@
|
|||
Copyright
|
||||
*/
|
||||
package main
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"github.com/mailgun/oxy/utils"
|
||||
log "github.com/Sirupsen/logrus"
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/mailgun/oxy/utils"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
type OxyLogger struct{
|
||||
type OxyLogger struct {
|
||||
}
|
||||
|
||||
func (oxylogger *OxyLogger) Infof(format string, args ...interface{}) {
|
||||
log.Debug(format, args...)
|
||||
log.Debugf(format, args...)
|
||||
}
|
||||
|
||||
func (oxylogger *OxyLogger) Warningf(format string, args ...interface{}) {
|
||||
log.Warning(format, args...)
|
||||
log.Warningf(format, args...)
|
||||
}
|
||||
|
||||
func (oxylogger *OxyLogger) Errorf(format string, args ...interface{}) {
|
||||
log.Error(format, args...)
|
||||
log.Errorf(format, args...)
|
||||
}
|
||||
|
||||
type ErrorHandler struct {
|
||||
|
@ -40,4 +42,4 @@ func LoadDefaultConfig(gloablConfiguration *GlobalConfiguration) *mux.Router {
|
|||
router := mux.NewRouter()
|
||||
router.NotFoundHandler = http.HandlerFunc(notFoundHandler)
|
||||
return router
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue