]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Reduce log verbosity at level 3, with a focus on removing excessive log verbosity...
authorJames Yonan <james@openvpn.net>
Tue, 15 Mar 2011 05:06:23 +0000 (05:06 +0000)
committerDavid Sommerseth <dazo@users.sourceforge.net>
Mon, 25 Apr 2011 20:13:45 +0000 (22:13 +0200)
Version 2.1.3k

git-svn-id: http://svn.openvpn.net/projects/branches/BETA21@7033 e7ae566f-a301-0410-adde-c780ea21d3b5

errlevel.h
init.c
lzo.c
multi.c
socket.c
version.m4

index a47edacbce8b97c911ac6e24a844bab7ba47e759..13a711405688761fb9aa7c34f75be6b9c19e302f 100644 (file)
@@ -71,9 +71,7 @@
 #define D_ALIGN_ERRORS       LOGLEV(1, 14, M_NONFATAL)   /* show bad struct alignments */
 
 #define D_HANDSHAKE          LOGLEV(2, 20, 0)        /* show data & control channel handshakes */
-#define D_MTU_INFO           LOGLEV(2, 21, 0)        /* show terse MTU info */
 #define D_CLOSE              LOGLEV(2, 22, 0)        /* show socket and TUN/TAP close */
-#define D_SHOW_OCC_HASH      LOGLEV(2, 23, 0)        /* show MD5 hash of option compatibility string */
 #define D_PROXY              LOGLEV(2, 24, 0)        /* show http proxy control packets */
 #define D_ARGV               LOGLEV(2, 25, 0)        /* show struct argv errors */
 
 #define D_PACKET_TRUNC_ERR   LOGLEV(4, 55, 0)        /* PACKET_TRUNCATION_CHECK */
 #define D_PF_DROPPED         LOGLEV(4, 56, 0)        /* packet filter dropped a packet */
 #define D_MULTI_DROPPED      LOGLEV(4, 57, 0)        /* show point-to-multipoint packet drops */
-#define D_X509_ATTR          LOGLEV(4, 58, 0)        /* show x509-track attributes on connection */
+#define D_MULTI_MEDIUM       LOGLEV(4, 58, 0)        /* show medium frequency multi messages */
+#define D_X509_ATTR          LOGLEV(4, 59, 0)        /* show x509-track attributes on connection */
+#define D_INIT_MEDIUM        LOGLEV(4, 60, 0)        /* show medium frequency init messages */
+#define D_MTU_INFO           LOGLEV(4, 61, 0)        /* show terse MTU info */
+#define D_SHOW_OCC_HASH      LOGLEV(4, 62, 0)        /* show MD5 hash of option compatibility string */
 
 #define D_LOG_RW             LOGLEV(5, 0,  0)        /* Print 'R' or 'W' to stdout for read/write */
 
-#define D_LINK_RW            LOGLEV(6, 60, M_DEBUG)  /* show TCP/UDP reads/writes (terse) */
-#define D_TUN_RW             LOGLEV(6, 60, M_DEBUG)  /* show TUN/TAP reads/writes */
-#define D_TAP_WIN32_DEBUG    LOGLEV(6, 60, M_DEBUG)  /* show TAP-Win32 driver debug info */
-#define D_CLIENT_NAT         LOGLEV(6, 60, M_DEBUG)  /* show client NAT debug info */
+#define D_LINK_RW            LOGLEV(6, 69, M_DEBUG)  /* show TCP/UDP reads/writes (terse) */
+#define D_TUN_RW             LOGLEV(6, 69, M_DEBUG)  /* show TUN/TAP reads/writes */
+#define D_TAP_WIN32_DEBUG    LOGLEV(6, 69, M_DEBUG)  /* show TAP-Win32 driver debug info */
+#define D_CLIENT_NAT         LOGLEV(6, 69, M_DEBUG)  /* show client NAT debug info */
 
 #define D_SHOW_KEYS          LOGLEV(7, 70, M_DEBUG)  /* show data channel encryption keys */
 #define D_SHOW_KEY_SOURCE    LOGLEV(7, 70, M_DEBUG)  /* show data channel key source entropy */
diff --git a/init.c b/init.c
index 4214233e6c17146cb8b5a44499041636b351bd85..d0a1baaa9f86485313771c151c7f6c793a74b144 100644 (file)
--- a/init.c
+++ b/init.c
@@ -1981,7 +1981,7 @@ do_init_crypto_tls_c1 (struct context *c)
     }
   else
     {
-      msg (M_INFO, "Re-using SSL/TLS context");
+      msg (D_INIT_MEDIUM, "Re-using SSL/TLS context");
     }
 }
 
diff --git a/lzo.c b/lzo.c
index 7343051227400888bf97e7d7b1b39da67f40e65c..3d6aa5a99f0ce35d963929663ead6b9332e7ab1f 100644 (file)
--- a/lzo.c
+++ b/lzo.c
@@ -106,9 +106,9 @@ lzo_compress_init (struct lzo_compress_workspace *lzowork, unsigned int flags)
     msg (M_FATAL, "Cannot initialize LZO compression library");
   lzowork->wmem = (lzo_voidp) lzo_malloc (lzowork->wmem_size);
   check_malloc_return (lzowork->wmem);
-  msg (M_INFO, "LZO compression initialized");
+  msg (D_INIT_MEDIUM, "LZO compression initialized");
 #else
-  msg (M_INFO, "LZO stub compression initialized");
+  msg (D_INIT_MEDIUM, "LZO stub compression initialized");
 #endif
   lzowork->defined = true;
 }
diff --git a/multi.c b/multi.c
index 2d1b0ab38bf5ca3112e38dd8a562bec9924889b1..df96ba5303c07038f72ef17fbf853e66623f0554 100644 (file)
--- a/multi.c
+++ b/multi.c
@@ -629,7 +629,7 @@ multi_create_instance (struct multi_context *m, const struct mroute_addr *real)
 
   perf_push (PERF_MULTI_CREATE_INSTANCE);
 
-  msg (D_MULTI_LOW, "MULTI: multi_create_instance called");
+  msg (D_MULTI_MEDIUM, "MULTI: multi_create_instance called");
 
   ALLOC_OBJ_CLEAR (mi, struct multi_instance);
 
index 815320988ede31c653228b4110760fba28c789e0..8e5825030c73aef6eda8c7e81fca1097ce98c0e2 100644 (file)
--- a/socket.c
+++ b/socket.c
@@ -1551,21 +1551,25 @@ link_socket_init_phase2 (struct link_socket *sock,
 #endif
 
   /* print local address */
-  if (sock->inetd)
-    msg (M_INFO, "%s link local: [inetd]", proto2ascii (sock->info.proto, true));
-  else
-    msg (M_INFO, "%s link local%s: %s",
+  {
+    const int msglevel = (sock->mode == LS_MODE_TCP_ACCEPT_FROM) ? D_INIT_MEDIUM : M_INFO;
+
+    if (sock->inetd)
+      msg (msglevel, "%s link local: [inetd]", proto2ascii (sock->info.proto, true));
+    else
+      msg (msglevel, "%s link local%s: %s",
+          proto2ascii (sock->info.proto, true),
+          (sock->bind_local ? " (bound)" : ""),
+          print_sockaddr_ex (&sock->info.lsa->local, ":", sock->bind_local ? PS_SHOW_PORT : 0, &gc));
+
+    /* print active remote address */
+    msg (msglevel, "%s link remote: %s",
         proto2ascii (sock->info.proto, true),
-        (sock->bind_local ? " (bound)" : ""),
-        print_sockaddr_ex (&sock->info.lsa->local, ":", sock->bind_local ? PS_SHOW_PORT : 0, &gc));
-
-  /* print active remote address */
-  msg (M_INFO, "%s link remote: %s",
-       proto2ascii (sock->info.proto, true),
-       print_link_socket_actual_ex (&sock->info.lsa->actual,
-                                   ":",
-                                   PS_SHOW_PORT_IF_DEFINED,
-                                   &gc));
+        print_link_socket_actual_ex (&sock->info.lsa->actual,
+                                     ":",
+                                     PS_SHOW_PORT_IF_DEFINED,
+                                     &gc));
+  }
 
  done:
   if (sig_save && signal_received)
@@ -1594,7 +1598,7 @@ link_socket_close (struct link_socket *sock)
 #endif
          if (!gremlin)
            {
-             msg (D_CLOSE, "TCP/UDP: Closing socket");
+             msg (D_LOW, "TCP/UDP: Closing socket");
              if (openvpn_close_socket (sock->sd))
                msg (M_WARN | M_ERRNO_SOCK, "TCP/UDP: Close Socket failed");
            }
index e173442b840f522a6272e78327c0fd14f48c170f..e3825f2df252f15392ad4090eda908b538830dd7 100644 (file)
@@ -1,5 +1,5 @@
 dnl define the OpenVPN version
-define(PRODUCT_VERSION,[2.1.3j])
+define(PRODUCT_VERSION,[2.1.3k])
 dnl define the TAP version
 define(PRODUCT_TAP_ID,[tap0901])
 define(PRODUCT_TAP_WIN32_MIN_MAJOR,[9])