Add ``all'' logging.
Submitted by: eivind
This commit is contained in:
parent
2388e045c4
commit
7f03ca53aa
@ -2020,7 +2020,7 @@ static struct cmdtab const SetCommands[] = {
|
||||
{"lcpretry", "lcpretries", SetVariable, LOCAL_AUTH | LOCAL_CX, "LCP retries",
|
||||
"set lcpretry value [attempts]", (const void *)VAR_LCPRETRY},
|
||||
{"log", NULL, log_SetLevel, LOCAL_AUTH, "log level",
|
||||
"set log [local] [+|-]async|cbcp|ccp|chat|command|connect|debug|dns|hdlc|"
|
||||
"set log [local] [+|-]all|async|cbcp|ccp|chat|command|connect|debug|dns|hdlc|"
|
||||
"id0|ipcp|lcp|lqm|phase|physical|sync|tcp/ip|timer|tun..."},
|
||||
{"login", NULL, SetVariable, LOCAL_AUTH | LOCAL_CX,
|
||||
"login script", "set login chat-script", (const void *) VAR_LOGIN},
|
||||
|
@ -453,6 +453,24 @@ log_SetLevel(struct cmdargs const *arg)
|
||||
|
||||
while (argc--) {
|
||||
argp = **argv == '+' || **argv == '-' ? *argv + 1 : *argv;
|
||||
/* Special case 'all' */
|
||||
if (strcasecmp(argp, "all") == 0) {
|
||||
if (**argv == '-') {
|
||||
if (local)
|
||||
for (i = LogMIN; i <= LogMAX; i++)
|
||||
log_DiscardLocal(i, &arg->prompt->logmask);
|
||||
else
|
||||
for (i = LogMIN; i <= LogMAX; i++)
|
||||
log_Discard(i);
|
||||
} else if (local)
|
||||
for (i = LogMIN; i <= LogMAX; i++)
|
||||
log_KeepLocal(i, &arg->prompt->logmask);
|
||||
else
|
||||
for (i = LogMIN; i <= LogMAX; i++)
|
||||
log_Keep(i);
|
||||
argv++;
|
||||
continue;
|
||||
}
|
||||
for (i = LogMIN; i <= LogMAX; i++)
|
||||
if (strcasecmp(argp, log_Name(i)) == 0) {
|
||||
if (**argv == '-') {
|
||||
|
@ -2151,6 +2151,11 @@ is able to generate the following log info either via
|
||||
or directly to the screen:
|
||||
.Pp
|
||||
.Bl -tag -width XXXXXXXXX -offset XXX -compact
|
||||
.It Li All
|
||||
Enable all logging facilities.
|
||||
This generates a lot of log.
|
||||
The most common use of 'all' is as a basis, where you remove some facilities
|
||||
after enabling 'all' ('debug' and 'timer' are usually best disabled.)
|
||||
.It Li Async
|
||||
Dump async level packet in hex.
|
||||
.It Li CBCP
|
||||
|
@ -2151,6 +2151,11 @@ is able to generate the following log info either via
|
||||
or directly to the screen:
|
||||
.Pp
|
||||
.Bl -tag -width XXXXXXXXX -offset XXX -compact
|
||||
.It Li All
|
||||
Enable all logging facilities.
|
||||
This generates a lot of log.
|
||||
The most common use of 'all' is as a basis, where you remove some facilities
|
||||
after enabling 'all' ('debug' and 'timer' are usually best disabled.)
|
||||
.It Li Async
|
||||
Dump async level packet in hex.
|
||||
.It Li CBCP
|
||||
|
Loading…
Reference in New Issue
Block a user