diff options
| author | 2009-11-02 20:23:29 +0000 | |
|---|---|---|
| committer | 2009-11-02 20:23:29 +0000 | |
| commit | c331907069073ad55c6b7ec9c91d7e1959a3bdf0 (patch) | |
| tree | 854c941fe083675143827a05b9756c61482b0109 /usr.sbin/ldpctl/parser.c | |
| parent | Implement IMSG_CTL_LOG_VERBOSE to enable or disable debug logging on runtime. (diff) | |
| download | wireguard-openbsd-c331907069073ad55c6b7ec9c91d7e1959a3bdf0.tar.xz wireguard-openbsd-c331907069073ad55c6b7ec9c91d7e1959a3bdf0.zip | |
Implement "log verbose" and "log brief" to enable or disable verbose debug
logging. henning, sthen, michele like the idea
Diffstat (limited to 'usr.sbin/ldpctl/parser.c')
| -rw-r--r-- | usr.sbin/ldpctl/parser.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/usr.sbin/ldpctl/parser.c b/usr.sbin/ldpctl/parser.c index 6285a3c4945..f3652d2a105 100644 --- a/usr.sbin/ldpctl/parser.c +++ b/usr.sbin/ldpctl/parser.c @@ -1,4 +1,4 @@ -/* $OpenBSD: parser.c,v 1.1 2009/06/01 20:59:45 michele Exp $ */ +/* $OpenBSD: parser.c,v 1.2 2009/11/02 20:35:20 claudio Exp $ */ /* * Copyright (c) 2009 Michele Marchetto <michele@openbsd.org> @@ -59,11 +59,13 @@ static const struct token t_show_area[]; static const struct token t_show_nbr[]; static const struct token t_show_lib[]; static const struct token t_show_lfib[]; +static const struct token t_log[]; static const struct token t_main[] = { /* {KEYWORD, "reload", RELOAD, NULL}, */ {KEYWORD, "lfib", LFIB, t_lfib}, {KEYWORD, "show", SHOW, t_show}, + {KEYWORD, "log", NONE, t_log}, {ENDTOKEN, "", NONE, NULL} }; @@ -97,6 +99,12 @@ static const struct token t_show_lib[] = { {ENDTOKEN, "", NONE, NULL} }; +static const struct token t_log[] = { + {KEYWORD, "verbose", LOG_VERBOSE, NULL}, + {KEYWORD, "brief", LOG_BRIEF, NULL}, + {ENDTOKEN, "", NONE, NULL} +}; + static const struct token t_show_lfib[] = { {NOTOKEN, "", NONE, NULL}, {KEYWORD, "interface", SHOW_LFIB_IFACE, t_show_iface}, |
