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

Method LogLevel

pkg/topom/topom_api.go:666–680  ·  view source on GitHub ↗
(params martini.Params)

Source from the content-addressed store, hash-verified

664}
665
666func (s *apiServer) LogLevel(params martini.Params) (int, string) {
667 if err := s.verifyXAuth(params); err != nil {
668 return rpc.ApiResponseError(err)
669 }
670 v := params["value"]
671 if v == "" {
672 return rpc.ApiResponseError(errors.New("missing loglevel"))
673 }
674 if !log.SetLevelString(v) {
675 return rpc.ApiResponseError(errors.New("invalid loglevel"))
676 } else {
677 log.Warnf("set loglevel to %s", v)
678 return rpc.ApiResponseJson("OK")
679 }
680}
681
682func (s *apiServer) Shutdown(params martini.Params) (int, string) {
683 if err := s.verifyXAuth(params); err != nil {

Callers 1

TestApiTopomFunction · 0.45

Calls 3

verifyXAuthMethod · 0.95
SetLevelStringMethod · 0.80
WarnfMethod · 0.80

Tested by 1

TestApiTopomFunction · 0.36