Nikita Zinkevich
6c69ecebd2
Build tag 'loghttp' for log_http.go. Created log_http_stub.go for default response without tag. Signed-off-by: Nikita Zinkevich <n.zinkevich@yadro.com>
31 lines
572 B
Go
31 lines
572 B
Go
//go:build !loghttp
|
|
|
|
package middleware
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"git.frostfs.info/TrueCloudLab/frostfs-s3-gw/internal/logs"
|
|
"go.uber.org/zap"
|
|
)
|
|
|
|
type LogHTTPConfig struct {
|
|
Enabled bool
|
|
MaxBody int64
|
|
MaxLogSize int
|
|
OutputPath string
|
|
UseGzip bool
|
|
}
|
|
|
|
func LogHTTP(l *zap.Logger, _ *LogHTTPConfig) Func {
|
|
l.Warn(logs.LogHTTPDisabledInThisBuild)
|
|
return func(h http.Handler) http.Handler {
|
|
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
h.ServeHTTP(w, r)
|
|
})
|
|
}
|
|
}
|
|
|
|
func ReloadFileLogger(conf *LogHTTPConfig) error {
|
|
return nil
|
|
}
|