Skip to content

Commit

Permalink
lib: Use basename of unix socket path as event log prefix
Browse files Browse the repository at this point in the history
This is to make the prefix consistent with other unix socket loggings in
Dovecot.
  • Loading branch information
mrannanj authored and villesavolainen committed Nov 14, 2018
1 parent 1b2cc46 commit 9867ac5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/connection.c
Expand Up @@ -14,6 +14,7 @@
#include "connection.h"

#include <unistd.h>
#include <libgen.h>

static void connection_idle_timeout(struct connection *conn)
{
Expand Down Expand Up @@ -321,7 +322,7 @@ void connection_init_client_unix(struct connection_list *list,
event_field_clear(conn->event, "client_port");

event_set_append_log_prefix(conn->event, t_strdup_printf("(%s): ",
conn->name));
basename(conn->name)));
}

void connection_init_from_streams(struct connection_list *list,
Expand Down

0 comments on commit 9867ac5

Please sign in to comment.