mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-10 15:01:03 +00:00
parent
f8e21b2798
commit
ebb3c8a290
2 changed files with 12 additions and 0 deletions
|
|
@ -11,6 +11,7 @@ import (
|
|||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
"math"
|
||||
"mime"
|
||||
"net"
|
||||
|
|
@ -4319,3 +4320,7 @@ func (h *Handler) handlePostDataframe(w http.ResponseWriter, r *http.Request) {
|
|||
return
|
||||
}
|
||||
}
|
||||
|
||||
func (h *Handler) DiscardHTTPServerLogs() {
|
||||
h.server.ErrorLog = log.New(io.Discard, "", 0)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -723,6 +723,13 @@ func (m *Command) setupServer() error {
|
|||
return errors.Wrap(err, "new handler")
|
||||
}
|
||||
|
||||
// ignore http server logs unless verbose logging in enabled
|
||||
if uri.Scheme == "https" {
|
||||
if !m.Config.Verbose {
|
||||
hndlr.DiscardHTTPServerLogs()
|
||||
}
|
||||
}
|
||||
|
||||
m.httpHandler = hndlr
|
||||
m.Handler = hndlr
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue