diff options
author | James Yonan <james@openvpn.net> | 2011-03-15 05:06:23 +0000 |
---|---|---|
committer | David Sommerseth <dazo@users.sourceforge.net> | 2011-04-25 22:13:45 +0200 |
commit | 9df9e13f7c20e0c046b71de859e08a07edf0eb4f (patch) | |
tree | 560ef26dc6a745e0e8294c39c62570ce9142fa7a /socket.c | |
parent | 1c5ff7722dbd3e32aa3e5b7d5cb77773f083472d (diff) | |
download | openvpn-9df9e13f7c20e0c046b71de859e08a07edf0eb4f.tar.gz openvpn-9df9e13f7c20e0c046b71de859e08a07edf0eb4f.tar.xz openvpn-9df9e13f7c20e0c046b71de859e08a07edf0eb4f.zip |
Reduce log verbosity at level 3, with a focus on removing excessive log verbosity generated by port-share activity.
Version 2.1.3k
git-svn-id: http://svn.openvpn.net/projects/branches/BETA21@7033 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'socket.c')
-rw-r--r-- | socket.c | 34 |
1 files changed, 19 insertions, 15 deletions
@@ -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"); } |