2015-09-19 11:02:59 +00:00
|
|
|
/*
|
|
|
|
Copyright
|
|
|
|
*/
|
|
|
|
package main
|
2015-09-24 12:32:37 +00:00
|
|
|
|
2015-09-19 11:02:59 +00:00
|
|
|
import (
|
2015-11-06 17:11:57 +00:00
|
|
|
"net/http"
|
|
|
|
|
2016-08-18 12:20:11 +00:00
|
|
|
"github.com/containous/traefik/log"
|
2015-09-19 11:02:59 +00:00
|
|
|
)
|
|
|
|
|
2015-11-06 17:11:57 +00:00
|
|
|
// OxyLogger implements oxy Logger interface with logrus.
|
2015-09-24 12:32:37 +00:00
|
|
|
type OxyLogger struct {
|
2015-09-19 11:02:59 +00:00
|
|
|
}
|
|
|
|
|
2015-11-06 17:11:57 +00:00
|
|
|
// Infof logs specified string as Debug level in logrus.
|
2015-09-19 11:02:59 +00:00
|
|
|
func (oxylogger *OxyLogger) Infof(format string, args ...interface{}) {
|
2015-09-24 12:32:37 +00:00
|
|
|
log.Debugf(format, args...)
|
2015-09-19 11:02:59 +00:00
|
|
|
}
|
|
|
|
|
2015-11-06 17:11:57 +00:00
|
|
|
// Warningf logs specified string as Warning level in logrus.
|
2015-09-19 11:02:59 +00:00
|
|
|
func (oxylogger *OxyLogger) Warningf(format string, args ...interface{}) {
|
2015-09-24 12:32:37 +00:00
|
|
|
log.Warningf(format, args...)
|
2015-09-19 11:02:59 +00:00
|
|
|
}
|
|
|
|
|
2016-04-13 16:37:22 +00:00
|
|
|
// Errorf logs specified string as Warningf level in logrus.
|
2015-09-19 11:02:59 +00:00
|
|
|
func (oxylogger *OxyLogger) Errorf(format string, args ...interface{}) {
|
2016-04-13 16:37:22 +00:00
|
|
|
log.Warningf(format, args...)
|
2015-09-19 11:02:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func notFoundHandler(w http.ResponseWriter, r *http.Request) {
|
|
|
|
http.NotFound(w, r)
|
|
|
|
//templatesRenderer.HTML(w, http.StatusNotFound, "notFound", nil)
|
|
|
|
}
|