mirror of
https://gitlab.labs.nic.cz/labs/bird.git
synced 2024-05-11 16:54:54 +00:00
Tracing of CLI connections/commands can be now controlled
by `debug commands <level>' in the configuration. Level 0 means no tracing, 1 means connections only, 2 includes all commands.
This commit is contained in:
@@ -162,6 +162,8 @@ cli_command(struct cli *c)
|
||||
struct config f;
|
||||
int res;
|
||||
|
||||
if (config->cli_debug > 1)
|
||||
log(L_TRACE "CLI: %s", c->rx_buf);
|
||||
bzero(&f, sizeof(f));
|
||||
f.mem = c->parser_pool;
|
||||
cf_read_hook = cli_cmd_read_hook;
|
||||
|
@@ -22,7 +22,7 @@ CF_DECLS
|
||||
CF_KEYWORDS(ROUTER, ID, PROTOCOL, PREFERENCE, DISABLED, DEBUG, ALL, OFF, DIRECT)
|
||||
CF_KEYWORDS(INTERFACE, IMPORT, EXPORT, FILTER, NONE, TABLE, STATES, ROUTES, FILTERS)
|
||||
CF_KEYWORDS(PASSWORD, FROM, PASSIVE, TO, ID, EVENTS, PACKETS, PROTOCOLS, INTERFACES)
|
||||
CF_KEYWORDS(PRIMARY, STATS, COUNT, FOR)
|
||||
CF_KEYWORDS(PRIMARY, STATS, COUNT, FOR, COMMANDS)
|
||||
|
||||
CF_ENUM(T_ENUM_RTS, RTS_, DUMMY, STATIC, INHERIT, DEVICE, STATIC_DEVICE, REDIRECT,
|
||||
RIP, OSPF, OSPF_EXT, OSPF_IA, OSPF_BOUNDARY, BGP, PIPE)
|
||||
@@ -118,6 +118,7 @@ CF_ADDTO(conf, debug_default)
|
||||
|
||||
debug_default:
|
||||
DEBUG PROTOCOLS debug_mask { new_config->proto_default_debug = $3; }
|
||||
| DEBUG COMMANDS expr { new_config->cli_debug = $3; }
|
||||
;
|
||||
|
||||
/* Interface patterns */
|
||||
|
Reference in New Issue
Block a user