build: move log level parse code and add new leveled sub logger interface

This commit is contained in:
Oliver Gugger
2019-09-20 16:15:53 +02:00
parent e64493fe5b
commit 3ea74c4362
3 changed files with 112 additions and 91 deletions

View File

@@ -12,7 +12,6 @@ import (
"net"
"net/http"
"sort"
"strings"
"sync"
"sync/atomic"
"time"
@@ -4343,7 +4342,7 @@ func (r *rpcServer) DebugLevel(ctx context.Context,
// sub-systems.
if req.Show {
return &lnrpc.DebugLevelResponse{
SubSystems: strings.Join(supportedSubsystems(), " "),
SubSystems: "", //TODO(guggero) fix strings.Join(supportedSubsystems(), " "),
}, nil
}
@@ -4351,9 +4350,11 @@ func (r *rpcServer) DebugLevel(ctx context.Context,
// Otherwise, we'll attempt to set the logging level using the
// specified level spec.
/*TODO(guggero) fix
if err := parseAndSetDebugLevels(req.LevelSpec); err != nil {
return nil, err
}
*/
return &lnrpc.DebugLevelResponse{}, nil
}