diff --git a/common/flogging/logging.go b/common/flogging/logging.go index 9717ef9496f..e4a85513c40 100644 --- a/common/flogging/logging.go +++ b/common/flogging/logging.go @@ -37,8 +37,11 @@ var ( defaultOutput *os.File - modules map[string]string // Holds the map of all modules and their respective log level - lock sync.Mutex + modules map[string]string // Holds the map of all modules and their respective log level + peerStartModules map[string]string + + lock sync.RWMutex + once sync.Once // IsSetLevelByRegExpEnabled allows the setting of log levels using a regular // expression, instead of one module at a time, when set to true. @@ -56,7 +59,7 @@ func init() { func Reset() { IsSetLevelByRegExpEnabled = false // redundant since the default for booleans is `false` but added for clarity modules = make(map[string]string) - lock = sync.Mutex{} + lock = sync.RWMutex{} defaultOutput = os.Stderr InitBackend(SetFormat(defaultFormat), defaultOutput) @@ -98,8 +101,12 @@ func GetModuleLevel(module string) string { // regular expression. Can be used to dynamically change the log level for the // module. func SetModuleLevel(moduleRegExp string, level string) (string, error) { - var re *regexp.Regexp + return setModuleLevel(moduleRegExp, level, false) +} +func setModuleLevel(moduleRegExp string, level string, revert bool) (string, error) { + + var re *regexp.Regexp logLevel, err := logging.LogLevel(level) if err != nil { logger.Warningf("Invalid logging level '%s' - ignored", level) @@ -107,7 +114,7 @@ func SetModuleLevel(moduleRegExp string, level string) (string, error) { // TODO This check is here to preserve the old functionality until all // other packages switch to `flogging.MustGetLogger` (from // `logging.MustGetLogger`). - if !IsSetLevelByRegExpEnabled { + if !IsSetLevelByRegExpEnabled || revert { logging.SetLevel(logging.Level(logLevel), moduleRegExp) logger.Debugf("Module '%s' logger enabled for log level '%s'", moduleRegExp, logLevel) } else { @@ -123,7 +130,7 @@ func SetModuleLevel(moduleRegExp string, level string) (string, error) { if re.MatchString(module) { logging.SetLevel(logging.Level(logLevel), module) modules[module] = logLevel.String() - logger.Infof("Module '%s' logger enabled for log level '%s'", module, logLevel) + logger.Debugf("Module '%s' logger enabled for log level '%s'", module, logLevel) } } } @@ -185,3 +192,44 @@ func InitFromSpec(spec string) string { logging.SetLevel(levelAll, "") // set the logging level for all modules return levelAll.String() } + +// SetPeerStartupModulesMap saves the modules and their log levels. +// this function should only be called at the end of peer startup. +func SetPeerStartupModulesMap() { + lock.Lock() + defer lock.Unlock() + + once.Do(func() { + peerStartModules = make(map[string]string) + for k, v := range modules { + peerStartModules[k] = v + } + }) +} + +// GetPeerStartupLevel returns the peer startup level for the specified module. +// It will return an empty string if the input parameter is empty or the module +// is not found +func GetPeerStartupLevel(module string) string { + if module != "" { + if level, ok := peerStartModules[module]; ok { + return level + } + } + + return "" +} + +// RevertToPeerStartupLevels reverts the log levels for all modules to the level +// defined at the end of peer startup. +func RevertToPeerStartupLevels() error { + lock.RLock() + defer lock.RUnlock() + for key := range peerStartModules { + _, err := setModuleLevel(key, peerStartModules[key], true) + if err != nil { + return err + } + } + return nil +} diff --git a/common/flogging/logging_test.go b/common/flogging/logging_test.go index 92e411c096b..12edfc146c4 100644 --- a/common/flogging/logging_test.go +++ b/common/flogging/logging_test.go @@ -33,6 +33,7 @@ type testCase struct { expectedLevels []string modules []string withRegEx bool + revert bool shouldErr bool } @@ -46,22 +47,24 @@ func TestSetModuleLevel(t *testing.T) { var tc []testCase tc = append(tc, - testCase{"Valid", []string{"a", "warning"}, []string{"WARNING"}, []string{"a"}, false, false}, + testCase{"Valid", []string{"a", "warning"}, []string{"WARNING"}, []string{"a"}, false, false, false}, // Same as before - testCase{"Invalid", []string{"a", "foo"}, []string{"WARNING"}, []string{"a"}, false, false}, + testCase{"Invalid", []string{"a", "foo"}, []string{"WARNING"}, []string{"a"}, false, false, false}, // Tests with regular expressions testCase{"RegexModuleWithSubmodule", []string{"foo", "warning"}, []string{"WARNING", "WARNING", flogging.DefaultLevel()}, - []string{"foo", "foo/bar", "baz"}, true, false}, + []string{"foo", "foo/bar", "baz"}, true, false, false}, // Set the level for modules that contain "foo" or "baz" testCase{"RegexOr", []string{"foo|baz", "debug"}, []string{"DEBUG", "DEBUG", "DEBUG", flogging.DefaultLevel()}, - []string{"foo", "foo/bar", "baz", "random"}, true, false}, + []string{"foo", "foo/bar", "baz", "random"}, true, false, false}, // Set the level for modules that end with "bar" testCase{"RegexSuffix", []string{"bar$", "error"}, []string{"ERROR", flogging.DefaultLevel()}, - []string{"foo/bar", "bar/baz"}, true, false}, + []string{"foo/bar", "bar/baz"}, true, false, false}, testCase{"RegexComplex", []string{"^[a-z]+\\/[a-z]+#.+$", "warning"}, []string{flogging.DefaultLevel(), flogging.DefaultLevel(), "WARNING", "WARNING", "WARNING"}, - []string{"gossip/util", "orderer/util", "gossip/gossip#0.0.0.0:7051", "gossip/conn#-1", "orderer/conn#0.0.0.0:7051"}, true, false}, + []string{"gossip/util", "orderer/util", "gossip/gossip#0.0.0.0:7051", "gossip/conn#-1", "orderer/conn#0.0.0.0:7051"}, true, false, false}, testCase{"RegexInvalid", []string{"(", "warning"}, []string{flogging.DefaultLevel()}, - []string{"foo"}, true, true}, + []string{"foo"}, true, false, true}, + testCase{"RevertLevels", []string{"revertmodule1", "warning", "revertmodule2", "debug"}, []string{"WARNING", "DEBUG", "DEBUG"}, + []string{"revertmodule1", "revertmodule2", "revertmodule2/submodule"}, true, true, false}, ) assert := assert.New(t) @@ -72,26 +75,33 @@ func TestSetModuleLevel(t *testing.T) { for j := 0; j < len(tc[i].modules); j++ { flogging.MustGetLogger(tc[i].modules[j]) } + if tc[i].revert { + flogging.SetPeerStartupModulesMap() + } flogging.IsSetLevelByRegExpEnabled = true // enable for call below } - - _, err := flogging.SetModuleLevel(tc[i].args[0], tc[i].args[1]) - if tc[i].shouldErr { - assert.NotNil(err, "Should have returned an error") + for k := 0; k < len(tc[i].args); k = k + 2 { + _, err := flogging.SetModuleLevel(tc[i].args[k], tc[i].args[k+1]) + if tc[i].shouldErr { + assert.NotNil(err, "Should have returned an error") + } } - for k := 0; k < len(tc[i].expectedLevels); k++ { - assert.Equal(tc[i].expectedLevels[k], flogging.GetModuleLevel(tc[i].modules[k])) + for l := 0; l < len(tc[i].expectedLevels); l++ { + assert.Equal(tc[i].expectedLevels[l], flogging.GetModuleLevel(tc[i].modules[l])) + } + if tc[i].revert { + flogging.RevertToPeerStartupLevels() + for m := 0; m < len(tc[i].modules); m++ { + assert.Equal(flogging.GetPeerStartupLevel(tc[i].modules[m]), flogging.GetModuleLevel(tc[i].modules[m])) + } } - if tc[i].withRegEx { // Force reset (a) in case the next test is non-regex, (b) so as // to reset the modules map and reuse module names. flogging.Reset() - } }) } - } func TestInitFromSpec(t *testing.T) { @@ -120,25 +130,25 @@ func TestInitFromSpec(t *testing.T) { // MODULES tc = append(tc, - testCase{"SingleModuleLevel", []string{"a=info"}, []string{"INFO"}, []string{"a"}, false, false}, - testCase{"MultipleModulesMultipleLevels", []string{"a=info:b=debug"}, []string{"INFO", "DEBUG"}, []string{"a", "b"}, false, false}, - testCase{"MultipleModulesSameLevel", []string{"a,b=warning"}, []string{"WARNING", "WARNING"}, []string{"a", "b"}, false, false}, + testCase{"SingleModuleLevel", []string{"a=info"}, []string{"INFO"}, []string{"a"}, false, false, false}, + testCase{"MultipleModulesMultipleLevels", []string{"a=info:b=debug"}, []string{"INFO", "DEBUG"}, []string{"a", "b"}, false, false, false}, + testCase{"MultipleModulesSameLevel", []string{"a,b=warning"}, []string{"WARNING", "WARNING"}, []string{"a", "b"}, false, false, false}, ) // MODULES + DEFAULT tc = append(tc, - testCase{"GlobalDefaultAndSingleModuleLevel", []string{"info:a=warning"}, []string{"INFO", "WARNING"}, []string{"", "a"}, false, false}, - testCase{"SingleModuleLevelAndGlobalDefaultAtEnd", []string{"a=warning:info"}, []string{"WARNING", "INFO"}, []string{"a", ""}, false, false}, + testCase{"GlobalDefaultAndSingleModuleLevel", []string{"info:a=warning"}, []string{"INFO", "WARNING"}, []string{"", "a"}, false, false, false}, + testCase{"SingleModuleLevelAndGlobalDefaultAtEnd", []string{"a=warning:info"}, []string{"WARNING", "INFO"}, []string{"a", ""}, false, false, false}, ) // INVALID INPUT tc = append(tc, - testCase{"InvalidLevel", []string{"foo"}, []string{flogging.DefaultLevel()}, []string{""}, false, false}, - testCase{"InvalidLevelForSingleModule", []string{"a=foo"}, []string{flogging.DefaultLevel()}, []string{""}, false, false}, - testCase{"EmptyModuleEqualsLevel", []string{"=warning"}, []string{flogging.DefaultLevel()}, []string{""}, false, false}, - testCase{"InvalidModuleSyntax", []string{"a=b=c"}, []string{flogging.DefaultLevel()}, []string{""}, false, false}, + testCase{"InvalidLevel", []string{"foo"}, []string{flogging.DefaultLevel()}, []string{""}, false, false, false}, + testCase{"InvalidLevelForSingleModule", []string{"a=foo"}, []string{flogging.DefaultLevel()}, []string{""}, false, false, false}, + testCase{"EmptyModuleEqualsLevel", []string{"=warning"}, []string{flogging.DefaultLevel()}, []string{""}, false, false, false}, + testCase{"InvalidModuleSyntax", []string{"a=b=c"}, []string{flogging.DefaultLevel()}, []string{""}, false, false, false}, ) assert := assert.New(t) diff --git a/core/admin.go b/core/admin.go index f3b4661265e..e1f19dbde8f 100644 --- a/core/admin.go +++ b/core/admin.go @@ -94,3 +94,11 @@ func (*ServerAdmin) SetModuleLogLevel(ctx context.Context, request *pb.LogLevelR logResponse := &pb.LogLevelResponse{LogModule: request.LogModule, LogLevel: logLevelString} return logResponse, err } + +// RevertLogLevels reverts the log levels for all modules to the level +// defined at the end of peer startup. +func (*ServerAdmin) RevertLogLevels(context.Context, *empty.Empty) (*empty.Empty, error) { + err := flogging.RevertToPeerStartupLevels() + + return &empty.Empty{}, err +} diff --git a/peer/clilogging/common.go b/peer/clilogging/common.go index fc298dab051..969bf81416b 100644 --- a/peer/clilogging/common.go +++ b/peer/clilogging/common.go @@ -25,11 +25,17 @@ import ( func checkLoggingCmdParams(cmd *cobra.Command, args []string) error { var err error - - // check that at least one parameter is passed in - if len(args) == 0 { - err = errors.ErrorWithCallstack("Logging", "NoParameters", "No parameters provided.") - return err + if cmd.Name() == "revertlevels" { + if len(args) > 0 { + err = errors.ErrorWithCallstack("Logging", "ExtraParameters", "More parameters than necessary were provided. Expected 0, received %d.", len(args)) + return err + } + } else { + // check that at least one parameter is passed in + if len(args) == 0 { + err = errors.ErrorWithCallstack("Logging", "NoParameters", "No parameters provided.") + return err + } } if cmd.Name() == "setlevel" { diff --git a/peer/clilogging/logging.go b/peer/clilogging/logging.go index e9633b2671d..bfc79762220 100644 --- a/peer/clilogging/logging.go +++ b/peer/clilogging/logging.go @@ -32,6 +32,7 @@ var logger = logging.MustGetLogger("loggingCmd") func Cmd() *cobra.Command { loggingCmd.AddCommand(getLevelCmd()) loggingCmd.AddCommand(setLevelCmd()) + loggingCmd.AddCommand(revertLevelsCmd()) return loggingCmd } diff --git a/peer/clilogging/logging_test.go b/peer/clilogging/logging_test.go index 5ee333973f6..f490bf49c1c 100644 --- a/peer/clilogging/logging_test.go +++ b/peer/clilogging/logging_test.go @@ -39,7 +39,7 @@ func TestGetLevel(t *testing.T) { err := checkLoggingCmdParams(getLevelCmd(), args) if err != nil { - t.FailNow() + t.Fatal(err) } } @@ -93,6 +93,31 @@ func TestSetLevel(t *testing.T) { err := checkLoggingCmdParams(setLevelCmd(), args) if err != nil { + t.Fatal(err) + } +} + +// TestRevertLevels tests the parameter checking for revertlevels, which +// should return a nil error when zero parameters are provided +func TestRevertLevels(t *testing.T) { + var args []string + + err := checkLoggingCmdParams(revertLevelsCmd(), args) + + if err != nil { + t.Fatal(err) + } +} + +// TestRevertLevels_extraParameter tests the parameter checking for setlevel, which +// should return an error when any amount of parameters are provided +func TestRevertLevels_extraParameter(t *testing.T) { + args := make([]string, 1) + args[0] = "extraparameter" + + err := checkLoggingCmdParams(revertLevelsCmd(), args) + + if err == nil { t.FailNow() } } diff --git a/peer/clilogging/revertlevels.go b/peer/clilogging/revertlevels.go new file mode 100644 index 00000000000..301f720e7b9 --- /dev/null +++ b/peer/clilogging/revertlevels.go @@ -0,0 +1,62 @@ +/* +Copyright IBM Corp. 2017 All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package clilogging + +import ( + "golang.org/x/net/context" + + "github.com/golang/protobuf/ptypes/empty" + "github.com/hyperledger/fabric/peer/common" + + "github.com/spf13/cobra" +) + +func revertLevelsCmd() *cobra.Command { + return loggingRevertLevelsCmd +} + +var loggingRevertLevelsCmd = &cobra.Command{ + Use: "revertlevels", + Short: "Reverts the logging levels to the levels at the end of peer startup.", + Long: `Reverts the logging levels to the levels at the end of peer startup`, + Run: func(cmd *cobra.Command, args []string) { + revertLevels(cmd, args) + }, +} + +func revertLevels(cmd *cobra.Command, args []string) (err error) { + err = checkLoggingCmdParams(cmd, args) + + if err != nil { + logger.Warningf("Error: %s", err) + } else { + adminClient, err := common.GetAdminClient() + if err != nil { + logger.Warningf("%s", err) + return err + } + + _, err = adminClient.RevertLogLevels(context.Background(), &empty.Empty{}) + + if err != nil { + logger.Warningf("%s", err) + return err + } + logger.Info("Log levels reverted to the levels at the end of peer startup.") + } + return err +} diff --git a/peer/node/start.go b/peer/node/start.go index 872e2ec9ecd..bc46348bdb3 100644 --- a/peer/node/start.go +++ b/peer/node/start.go @@ -30,6 +30,7 @@ import ( genesisconfig "github.com/hyperledger/fabric/common/configtx/tool/localconfig" "github.com/hyperledger/fabric/common/configtx/tool/provisional" + "github.com/hyperledger/fabric/common/flogging" "github.com/hyperledger/fabric/common/localmsp" "github.com/hyperledger/fabric/common/util" "github.com/hyperledger/fabric/core" @@ -264,6 +265,13 @@ func serve(args []string) error { common.SetLogLevelFromViper("error") common.SetLogLevelFromViper("msp") + // TODO This check is here to preserve the old functionality until all + // other packages switch to `flogging.MustGetLogger` (from + // `logging.MustGetLogger`). + if flogging.IsSetLevelByRegExpEnabled { + flogging.SetPeerStartupModulesMap() + } + // Block until grpc server exits return <-serve } diff --git a/protos/peer/admin.pb.go b/protos/peer/admin.pb.go index 9f5767e269f..bb5a075a1c2 100644 --- a/protos/peer/admin.pb.go +++ b/protos/peer/admin.pb.go @@ -179,6 +179,7 @@ type AdminClient interface { StopServer(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*ServerStatus, error) GetModuleLogLevel(ctx context.Context, in *LogLevelRequest, opts ...grpc.CallOption) (*LogLevelResponse, error) SetModuleLogLevel(ctx context.Context, in *LogLevelRequest, opts ...grpc.CallOption) (*LogLevelResponse, error) + RevertLogLevels(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*google_protobuf.Empty, error) } type adminClient struct { @@ -234,6 +235,15 @@ func (c *adminClient) SetModuleLogLevel(ctx context.Context, in *LogLevelRequest return out, nil } +func (c *adminClient) RevertLogLevels(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*google_protobuf.Empty, error) { + out := new(google_protobuf.Empty) + err := grpc.Invoke(ctx, "/protos.Admin/RevertLogLevels", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // Server API for Admin service type AdminServer interface { @@ -243,6 +253,7 @@ type AdminServer interface { StopServer(context.Context, *google_protobuf.Empty) (*ServerStatus, error) GetModuleLogLevel(context.Context, *LogLevelRequest) (*LogLevelResponse, error) SetModuleLogLevel(context.Context, *LogLevelRequest) (*LogLevelResponse, error) + RevertLogLevels(context.Context, *google_protobuf.Empty) (*google_protobuf.Empty, error) } func RegisterAdminServer(s *grpc.Server, srv AdminServer) { @@ -339,6 +350,24 @@ func _Admin_SetModuleLogLevel_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _Admin_RevertLogLevels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(google_protobuf.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AdminServer).RevertLogLevels(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/protos.Admin/RevertLogLevels", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AdminServer).RevertLogLevels(ctx, req.(*google_protobuf.Empty)) + } + return interceptor(ctx, in, info, handler) +} + var _Admin_serviceDesc = grpc.ServiceDesc{ ServiceName: "protos.Admin", HandlerType: (*AdminServer)(nil), @@ -363,6 +392,10 @@ var _Admin_serviceDesc = grpc.ServiceDesc{ MethodName: "SetModuleLogLevel", Handler: _Admin_SetModuleLogLevel_Handler, }, + { + MethodName: "RevertLogLevels", + Handler: _Admin_RevertLogLevels_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: fileDescriptor0, @@ -371,31 +404,32 @@ var _Admin_serviceDesc = grpc.ServiceDesc{ func init() { proto.RegisterFile("peer/admin.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 409 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0x93, 0xcf, 0x6e, 0xd3, 0x40, - 0x10, 0xc6, 0xeb, 0x40, 0x02, 0x9e, 0x16, 0x58, 0x56, 0x08, 0xa2, 0x54, 0x08, 0xe4, 0x13, 0x5c, - 0xd6, 0x52, 0x39, 0x70, 0x00, 0x0e, 0x29, 0x36, 0x05, 0xd1, 0x3a, 0x96, 0xdd, 0x08, 0x81, 0x84, - 0x2a, 0x3b, 0x9e, 0x6e, 0x23, 0xd6, 0x5d, 0xb3, 0xbb, 0xae, 0x94, 0xd7, 0xe1, 0x9d, 0x78, 0x1f, - 0xb4, 0xde, 0x58, 0x89, 0x80, 0x0b, 0x7f, 0x4e, 0xe3, 0x99, 0xf9, 0xbe, 0x4f, 0xf6, 0x4f, 0x1e, - 0x20, 0x0d, 0xa2, 0x0a, 0x8b, 0xaa, 0x5e, 0x5e, 0xb2, 0x46, 0x49, 0x23, 0xe9, 0xa8, 0x2b, 0x7a, - 0xb2, 0xcf, 0xa5, 0xe4, 0x02, 0xc3, 0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, 0xe0, 0x59, 0x0f, 0x9e, - 0xc5, 0x16, 0xfc, 0xe4, 0xde, 0xef, 0x88, 0x06, 0x3b, 0xf4, 0x15, 0xec, 0xe6, 0xa6, 0x50, 0xc6, - 0x8d, 0xff, 0xd8, 0xfe, 0xd2, 0xf2, 0x97, 0xcd, 0x5f, 0xba, 0xdf, 0xc2, 0xdd, 0x23, 0x34, 0xee, - 0x6b, 0x7b, 0x38, 0xf4, 0x41, 0x2f, 0xfe, 0x89, 0xfe, 0x64, 0xfc, 0xeb, 0xc2, 0x71, 0x74, 0x49, - 0xf9, 0x7f, 0x49, 0x3a, 0xfc, 0x0c, 0x81, 0x54, 0x9c, 0x5d, 0xac, 0x1a, 0x54, 0x02, 0x2b, 0x8e, - 0x8a, 0x9d, 0x17, 0xa5, 0x5a, 0x2e, 0x7a, 0x8f, 0xfd, 0xe5, 0x0f, 0xf7, 0x3a, 0xf4, 0x69, 0xb1, - 0xf8, 0x52, 0x70, 0xfc, 0xf4, 0x94, 0x2f, 0xcd, 0x45, 0x5b, 0xb2, 0x85, 0xac, 0xc3, 0x2d, 0x63, - 0xe8, 0x8c, 0xee, 0x06, 0x74, 0x68, 0x8d, 0xa5, 0xbb, 0x8f, 0x67, 0x3f, 0x02, 0x00, 0x00, 0xff, - 0xff, 0xc1, 0x51, 0x29, 0x73, 0x3a, 0x03, 0x00, 0x00, + // 424 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0x93, 0xc1, 0x6f, 0xd3, 0x30, + 0x14, 0xc6, 0xdb, 0x8d, 0x16, 0xf2, 0x36, 0x98, 0xb1, 0x10, 0x54, 0x9d, 0x10, 0x28, 0x27, 0xb8, + 0x38, 0xd2, 0x38, 0x70, 0x00, 0x0e, 0xdd, 0x12, 0x06, 0x62, 0x4b, 0x2b, 0x67, 0x15, 0x02, 0x09, + 0x4d, 0x69, 0xf3, 0xe6, 0x55, 0x38,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xc6, 0xa2, 0x7f, 0x03, 0x00, 0x00, } diff --git a/protos/peer/admin.proto b/protos/peer/admin.proto index 05cbbcf1f18..5aa7c35c337 100644 --- a/protos/peer/admin.proto +++ b/protos/peer/admin.proto @@ -32,6 +32,7 @@ service Admin { rpc StopServer(google.protobuf.Empty) returns (ServerStatus) {} rpc GetModuleLogLevel(LogLevelRequest) returns (LogLevelResponse) {} rpc SetModuleLogLevel(LogLevelRequest) returns (LogLevelResponse) {} + rpc RevertLogLevels(google.protobuf.Empty) returns (google.protobuf.Empty) {} } message ServerStatus {