MCPcopy Index your code
hub / github.com/CodisLabs/codis / handleLogLevel

Method handleLogLevel

cmd/admin/dashboard.go:167–182  ·  view source on GitHub ↗
(d map[string]interface{})

Source from the content-addressed store, hash-verified

165}
166
167func (t *cmdDashboard) handleLogLevel(d map[string]interface{}) {
168 c := t.newTopomClient()
169
170 s := utils.ArgumentMust(d, "--log-level")
171
172 var v log.LogLevel
173 if !v.ParseFromString(s) {
174 log.Panicf("option --log-level = %s", s)
175 }
176
177 log.Debugf("call rpc loglevel to dashboard %s", t.addr)
178 if err := c.LogLevel(v); err != nil {
179 log.PanicErrorf(err, "call rpc loglevel to dashboard %s failed", t.addr)
180 }
181 log.Debugf("call rpc loglevel OK")
182}
183
184func (t *cmdDashboard) handleShutdown(d map[string]interface{}) {
185 c := t.newTopomClient()

Callers 1

MainMethod · 0.95

Calls 6

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

Tested by

no test coverage detected