diff --git a/src/cfgparse.c b/src/cfgparse.c
index f3a7aee..6958a1d 100644
--- a/src/cfgparse.c
+++ b/src/cfgparse.c
@@ -1647,7 +1647,6 @@
 	}
 	else if (!strcmp(args[0], "log-send-hostname")) { /* set the hostname in syslog header */
 		char *name;
-		int len;
 
 		if (global.log_send_hostname != NULL) {
 			Alert("parsing [%s:%d] : '%s' already specified. Continuing.\n", file, linenum, args[0]);
@@ -1660,12 +1659,9 @@
 		else
 			name = hostname;
 
-		len = strlen(name);
-
 		/* We'll add a space after the name to respect the log format */
 		free(global.log_send_hostname);
-		global.log_send_hostname = malloc(len + 2);
-		snprintf(global.log_send_hostname, len + 2, "%s ", name);
+		global.log_send_hostname = strdup(name);
 	}
 	else if (!strcmp(args[0], "server-state-base")) { /* path base where HAProxy can find server state files */
 		if (global.server_state_base != NULL) {
@@ -7897,23 +7893,19 @@
 		list_for_each_entry(tmplogsrv, &curproxy->logsrvs, list) {
 			char *hdr;
 			struct chunk *htp;
-			char *htp_fmt;
 			char *host = global.log_send_hostname;
 
 			switch (tmplogsrv->format) {
 			case LOG_FORMAT_RFC3164:
 				hdr = logheader;
 				htp = &curproxy->log_htp;
-				htp_fmt = default_host_tag_pid_log_format;
 				host = host ? host : "";
 				break;
 
 			case LOG_FORMAT_RFC5424:
 				hdr = logheader_rfc5424;
 				htp = &curproxy->log_htp_rfc5424;
-				htp_fmt = rfc5424_host_tag_pid_log_format;
-				if (!curproxy->conf.logformat_sd_string)
-					curproxy->conf.logformat_sd_string = default_rfc5424_sd_log_format;
+				host = host ? host : hostname;
 				break;
 
 			default:
@@ -7923,19 +7915,10 @@
 			if (htp->str)
 				continue;
 
-			if (!host) {
-				int len = strlen(hostname);
-				host = malloc(len + 2);
-				snprintf(host, len + 2, "%s ", hostname);
-			}
-
-			htp->str = lf_host_tag_pid(hdr, htp_fmt, host,
+			htp->str = lf_host_tag_pid(hdr, tmplogsrv->format, host,
 			                           curproxy->log_tag ? curproxy->log_tag : global.log_tag,
 			                           pid, global.max_syslog_len);
 
-			if ((host != global.log_send_hostname) && strlen(host))
-				free(host);
-
 			if ((htp->str == NULL) ||
 			    ((htp->len = htp->str - hdr) >= global.max_syslog_len)) {
 				Alert("Proxy '%s': cannot write a syslog header string that contains "
diff --git a/src/log.c b/src/log.c
index 1829696..18a2006 100644
--- a/src/log.c
+++ b/src/log.c
@@ -158,8 +158,8 @@
 /* Common printf format strings for hostname, log_tag and pid used in all
  * outgoing syslog messages.
  */
-char default_host_tag_pid_log_format[] = "%s%s[%d]: ";
-char rfc5424_host_tag_pid_log_format[] = "%s%s %d - ";
+static char default_host_tag_pid_log_format[] = "%s%s%s[%d]: ";
+static char rfc5424_host_tag_pid_log_format[] = "%s%s%s %d - ";
 
 /* Default string used for structured-data part in RFC5424 formatted
  * syslog messages.
@@ -780,12 +780,26 @@
 	return ret;
 }
 
-char *lf_host_tag_pid(char *dst, const char *format, const char *hostname, const char *log_tag, int pid, size_t size)
+char *lf_host_tag_pid(char *dst, int format, const char *hostname, const char *log_tag, int pid, size_t size)
 {
 	char *ret = dst;
+	char *fmt;
 	int iret;
 
-	iret = snprintf(dst, size, format, hostname, log_tag, pid);
+	switch (format) {
+	case LOG_FORMAT_RFC3164:
+		fmt = default_host_tag_pid_log_format;
+		break;
+
+	case LOG_FORMAT_RFC5424:
+		fmt = rfc5424_host_tag_pid_log_format;
+		break;
+
+	default:
+		return NULL;
+	}
+
+	iret = snprintf(dst, size, fmt, hostname, strlen(hostname) ? " " : "", log_tag, pid);
 	if (iret < 0 || iret > size)
 		return NULL;
 	ret += iret;
