mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-28 06:32:18 +02:00
build/log: support parsing global+subsystem levels
This makes it possible to specify both a global+subsystem loglevels, like: --debuglevel=debug,PEER=info,SRVR=trace
This commit is contained in:
@@ -75,6 +75,20 @@ func TestParseAndSetDebugLevels(t *testing.T) {
|
||||
"SRVR": "debug",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "valid global+subsystem debug level",
|
||||
debugLevel: "trace,PEER=info,SRVR=debug",
|
||||
expGlobal: "trace",
|
||||
expSubLevels: map[string]string{
|
||||
"PEER": "info",
|
||||
"SRVR": "debug",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "invalid global+subsystem debug level",
|
||||
debugLevel: "PEER=info,debug,SRVR=debug",
|
||||
expErr: "invalid",
|
||||
},
|
||||
}
|
||||
|
||||
for _, test := range testCases {
|
||||
|
Reference in New Issue
Block a user