mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-06 02:34:03 +00:00
Ensure we capture http and trace related logs
When we are running apiserver related code, we do not currently capture the logs from `httplog.NewLogged` and `trace.LogIfLong` since the default log verbosity is not set. So just make sure we have a minimum verbosity set in these circumstance. Change-Id: I64a30029778615e679b244ddba801833218d1573
This commit is contained in:
parent
d7e0d9b45c
commit
e6f8e51c50
@ -17,10 +17,12 @@ limitations under the License.
|
|||||||
package framework
|
package framework
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"flag"
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
"path"
|
"path"
|
||||||
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/go-openapi/spec"
|
"github.com/go-openapi/spec"
|
||||||
@ -112,6 +114,13 @@ func startMasterOrDie(masterConfig *master.Config, incomingServer *httptest.Serv
|
|||||||
var m *master.Master
|
var m *master.Master
|
||||||
var s *httptest.Server
|
var s *httptest.Server
|
||||||
|
|
||||||
|
// Ensure we log at least level 4
|
||||||
|
v := flag.Lookup("v").Value
|
||||||
|
level, _ := strconv.Atoi(v.String())
|
||||||
|
if level < 4 {
|
||||||
|
v.Set("4")
|
||||||
|
}
|
||||||
|
|
||||||
if incomingServer != nil {
|
if incomingServer != nil {
|
||||||
s = incomingServer
|
s = incomingServer
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user