mirror of
https://github.com/netbirdio/netbird.git
synced 2026-03-31 06:34:19 -04:00
* implement reverse proxy --------- Co-authored-by: Alisdair MacLeod <git@alisdairmacleod.co.uk> Co-authored-by: mlsmaycon <mlsmaycon@gmail.com> Co-authored-by: Eduard Gert <kontakt@eduardgert.de> Co-authored-by: Viktor Liu <viktor@netbird.io> Co-authored-by: Diego Noguês <diego.sure@gmail.com> Co-authored-by: Diego Noguês <49420+diegocn@users.noreply.github.com> Co-authored-by: Bethuel Mmbaga <bethuelmbaga12@gmail.com> Co-authored-by: Zoltan Papp <zoltan.pmail@gmail.com> Co-authored-by: Ashley Mensah <ashleyamo982@gmail.com>
22 lines
578 B
Go
22 lines
578 B
Go
package proxy
|
|
|
|
import (
|
|
stdlog "log"
|
|
|
|
log "github.com/sirupsen/logrus"
|
|
)
|
|
|
|
const (
|
|
// HTTP server type identifiers for logging
|
|
logtagFieldHTTPServer = "http-server"
|
|
logtagValueHTTPS = "https"
|
|
logtagValueACME = "acme"
|
|
logtagValueDebug = "debug"
|
|
)
|
|
|
|
// newHTTPServerLogger creates a standard library logger that writes to logrus
|
|
// with the specified server type field.
|
|
func newHTTPServerLogger(logger *log.Logger, serverType string) *stdlog.Logger {
|
|
return stdlog.New(logger.WithField(logtagFieldHTTPServer, serverType).WriterLevel(log.WarnLevel), "", 0)
|
|
}
|