bool want_ssl_settings:1;
bool ssl_ctx_initialized:1;
bool config_path_from_master:1;
+ bool log_initialized:1;
};
void master_service_io_listeners_add(struct master_service *service);
const char *prefix)
{
const char *path, *timestamp;
+ bool log_already_initialized = service->log_initialized;
+ service->log_initialized = TRUE;
if ((service->flags & MASTER_SERVICE_FLAG_STANDALONE) != 0 &&
(service->flags & MASTER_SERVICE_FLAG_DONT_LOG_TO_STDERR) == 0) {
+ if (log_already_initialized)
+ return;
timestamp = getenv("LOG_STDERR_TIMESTAMP");
if (timestamp != NULL)
i_set_failure_timestamp_format(timestamp);
return;
}
+ if (log_already_initialized) {
+ /* change only the prefix */
+ i_set_failure_prefix("%s", prefix);
+ return;
+ }
+
if (getenv("LOG_SERVICE") != NULL && !service->log_directly) {
/* logging via log service */
i_set_failure_internal();
DOVECOT_PRESERVE_ENVS environment. */
void master_service_env_clean(void);
-/* Initialize logging. */
+/* Initialize logging. Only the first call changes the actual logging
+ functions. The following calls change the log prefix. */
void master_service_init_log(struct master_service *service,
const char *prefix);