]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: connection - Clarify logging of incoming connections
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 27 Aug 2018 07:35:47 +0000 (10:35 +0300)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Wed, 14 Nov 2018 11:44:16 +0000 (13:44 +0200)
Don't log "Client connected" for both incoming and outgoing connections.

src/lib/connection.c

index 9b4c0bc3de2fb37be0c7fef070f20823f14011a1..ed3d129ed028f314f1f70a7c3f2ebe03ebd271e5 100644 (file)
@@ -261,7 +261,10 @@ void connection_init_server(struct connection_list *list,
 
        struct event_passthrough *e = event_create_passthrough(conn->event)->
                set_name("client_connection_connected");
-       e_debug(e->event(), "Client connected");
+       /* fd_out differs from fd_in only for stdin/stdout. Keep the logging
+          output nice and clean by logging only the fd_in. If it's 0, it'll
+          also be obvious that fd_out=1. */
+       e_debug(e->event(), "Server accepted connection (fd=%d)", fd_in);
 
        connection_init_streams(conn);
 }