From: Sergey Kitov Date: Wed, 12 Dec 2018 14:21:29 +0000 (+0200) Subject: log: Use failure context log_prefix when available as prefix for error. X-Git-Tag: 2.3.9~972 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3d337acee95ded6d4fd53ad54aff867f871253fa;p=thirdparty%2Fdovecot%2Fcore.git log: Use failure context log_prefix when available as prefix for error. Current behaviour hides log prefix when seeing errors via doveadm log errors, this commit will fix it. --- diff --git a/src/log/log-connection.c b/src/log/log-connection.c index 3d8ed93553..3a6db8d13f 100644 --- a/src/log/log-connection.c +++ b/src/log/log-connection.c @@ -138,7 +138,7 @@ client_log_ctx(struct log_connection *log, i_zero(&err); err.type = ctx->type; err.timestamp = log_time->tv_sec; - err.prefix = prefix; + err.prefix = ctx->log_prefix != NULL ? ctx->log_prefix : prefix; err.text = text; log_error_buffer_add(log->errorbuf, &err); break;