build: separate sublogger and rotator pipe management
These are two separate concerns. So this commit splits them up and just passes a LogWriter from the one to the other. This will become cleaner in an upcoming commit where the Rotator will implement io.Writer and there will no longer be a need for LogWriter.
This commit is contained in:
6 files changed
+169
-107
No files matched your search
+3
-3
@@ -7341,7 +7341,7 @@ func (r *rpcServer) DebugLevel(ctx context.Context,
|
||||
if req.Show {
|
||||
return &lnrpc.DebugLevelResponse{
|
||||
SubSystems: strings.Join(
|
||||
r.cfg.LogWriter.SupportedSubsystems(), " ",
|
||||
r.cfg.SubLogMgr.SupportedSubsystems(), " ",
|
||||
),
|
||||
}, nil
|
||||
}
|
||||
@@ -7350,12 +7350,12 @@ func (r *rpcServer) DebugLevel(ctx context.Context,
|
||||
|
||||
// Otherwise, we'll attempt to set the logging level using the
|
||||
// specified level spec.
|
||||
err := build.ParseAndSetDebugLevels(req.LevelSpec, r.cfg.LogWriter)
|
||||
err := build.ParseAndSetDebugLevels(req.LevelSpec, r.cfg.SubLogMgr)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
subLoggers := r.cfg.LogWriter.SubLoggers()
|
||||
subLoggers := r.cfg.SubLogMgr.SubLoggers()
|
||||
// Sort alphabetically by subsystem name.
|
||||
var tags []string
|
||||
for t := range subLoggers {
|
||||
|
||||
Reference in new issue
Block a user