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 committed Aug 29, 2018
1 parent fc73625 commit 65985e3
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 65985e3

Please sign in to comment.