use instance-name for syslog?

Timo Sirainen tss at iki.fi
Thu May 31 21:40:07 EEST 2018


> On 30 May 2018, at 19.08, SATOH Fumiyasu <fumiyas at osstech.co.jp> wrote:
> 
> Hi!
> 
> On Thu, 31 May 2018 00:44:58 +0900,
> A. Schulze wrote:
>> When running multiple instances of dovecot on the same host (or running multiple docker container),
>> it is hard to distinguish logs from different processes: the syslog entries are all prefixed with the same identifier "dovecot"
>> It is hardcoded here:
>> https://github.com/dovecot/core/blob/master/src/lib-master/master-service.c#L420
>> 
>> Would it make sense to use the already implemented instance-name as syslog ident?
>> How do others solve that problem?
> 
> I have a patchset to implement that. Please see the attachment.

> Subject: [PATCH 1/2] master: Do not prepend "dovecot-" to a process name


Why not? I'd think it would be useful to always find dovecot processes.

> -	openlog(ident, options, facility);
> +	static char *syslog_ident = NULL;
> +
> +	i_free(syslog_ident);
> +	syslog_ident = i_strdup(ident);
> +
> +	openlog(syslog_ident, options, facility);


I don't think this is necessary?

> +		env_put(t_strconcat("INSTANCE_NAME=", set->instance_name, NULL));


Also not needed.

But yeah, I guess in general it would make sense to use instance_name for syslog ident.



More information about the dovecot mailing list