]> git.puffer.fish Git - mirror/frr.git/commitdiff
[vtysh] Add 'show logging' command
authorPaul Jakma <paul.jakma@sun.com>
Tue, 23 May 2006 22:10:01 +0000 (22:10 +0000)
committerPaul Jakma <paul.jakma@sun.com>
Tue, 23 May 2006 22:10:01 +0000 (22:10 +0000)
2006-05-17 Paul Jakma <paul.jakma@sun.com>

* vtysh.c: (general) Add 'show logging' command.

vtysh/ChangeLog
vtysh/vtysh.c

index 11192c1f72ad7b4f464bfb36c64358e24f5814c6..e4908b456e7d64904c317e8bae88ae46f14a57c6 100644 (file)
@@ -1,3 +1,7 @@
+2006-05-17 Paul Jakma <paul.jakma@sun.com>
+
+       * vtysh.c: (general) Add 'show logging' command.
+
 2006-01-11 Erik Smit <zoiah@zoiah.net>
 
        * vtysh.c: (vtysh_config_from_file) fix regression from
index 08ed7498733c3da2fd2f6524ee94d1a626fc7461..a2115faef4c81c4277fb0c0d78d4db0612a3d5bc 100644 (file)
@@ -1312,6 +1312,26 @@ ALIAS (vtysh_exit_interface,
        "Exit current mode and down to previous mode\n")
 
 /* Logging commands. */
+DEFUN (vtysh_show_logging,
+       vtysh_show_logging_cmd,
+       "show logging",
+       SHOW_STR
+       "Show current logging configuration\n")
+{
+  unsigned int i;
+  int ret = CMD_SUCCESS;
+  char line[] = "show logging\n";
+  
+  for (i = 0; i < VTYSH_INDEX_MAX; i++)
+    {
+      fprintf (stdout,"Logging configuration for %s:\n", vtysh_client[i].name);
+      ret = vtysh_client_execute (&vtysh_client[i], line, stdout);
+      fprintf (stdout,"\n");
+    }
+        
+  return ret;
+}
+
 DEFUNSH (VTYSH_ALL,
         vtysh_log_stdout,
         vtysh_log_stdout_cmd,
@@ -2326,7 +2346,10 @@ vtysh_init_vty (void)
   install_element (ENABLE_NODE, &vtysh_start_shell_cmd);
   install_element (ENABLE_NODE, &vtysh_start_bash_cmd);
   install_element (ENABLE_NODE, &vtysh_start_zsh_cmd);
-
+  
+  /* Logging */
+  install_element (ENABLE_NODE, &vtysh_show_logging_cmd);
+  install_element (VIEW_NODE, &vtysh_show_logging_cmd);
   install_element (CONFIG_NODE, &vtysh_log_stdout_cmd);
   install_element (CONFIG_NODE, &vtysh_log_stdout_level_cmd);
   install_element (CONFIG_NODE, &no_vtysh_log_stdout_cmd);