MCPcopy
hub / github.com/CodisLabs/codis / handleLogLevel

Method handleLogLevel

cmd/admin/proxy.go:117–132  ·  view source on GitHub ↗
(d map[string]interface{})

Source from the content-addressed store, hash-verified

115}
116
117func (t *cmdProxy) handleLogLevel(d map[string]interface{}) {
118 c := t.newProxyClient(true)
119
120 s := utils.ArgumentMust(d, "--log-level")
121
122 var v log.LogLevel
123 if !v.ParseFromString(s) {
124 log.Panicf("option --log-level = %s", s)
125 }
126
127 log.Debugf("call rpc loglevel to proxy %s", t.addr)
128 if err := c.LogLevel(v); err != nil {
129 log.PanicErrorf(err, "call rpc loglevel to proxy %s failed", t.addr)
130 }
131 log.Debugf("call rpc loglevel OK")
132}
133
134func (t *cmdProxy) handleFillSlots(d map[string]interface{}) {
135 c := t.newProxyClient(true)

Callers 1

MainMethod · 0.95

Calls 6

newProxyClientMethod · 0.95
ParseFromStringMethod · 0.95
PanicfMethod · 0.80
DebugfMethod · 0.80
PanicErrorfMethod · 0.80
LogLevelMethod · 0.45

Tested by

no test coverage detected