Index: libfdcore/cnxctx.c
===================================================================
--- libfdcore/cnxctx.c	(revision 961)
+++ libfdcore/cnxctx.c	(revision 974)
@@ -231,5 +231,5 @@
 		char buf[1024];
 		sSA_DUMP_NODE( buf, sizeof(buf), &ss, NI_NUMERICHOST );
-		fd_log_debug("%s : accepted new client [%s].\n", fd_cnx_getid(serv), buf);
+		fd_log_debug("%s : accepted new client [%s].", fd_cnx_getid(serv), buf);
 	}
 	
@@ -314,5 +314,5 @@
 		char buf[1024];
 		sSA_DUMP_NODE_SERV( buf, sizeof(buf), sa, NI_NUMERICSERV);
-		fd_log_debug("Connection established to server '%s' (TCP:%d).\n", buf, sock);
+		fd_log_debug("Connection established to server '%s' (TCP:%d).", buf, sock);
 	}
 	
@@ -406,5 +406,5 @@
 		char buf[1024];
 		sSA_DUMP_NODE_SERV( buf, sizeof(buf), &primary, NI_NUMERICSERV);
-		fd_log_debug("Connection established to server '%s' (SCTP:%d, %d/%d streams).\n", buf, sock, cnx->cc_sctp_para.str_in, cnx->cc_sctp_para.str_out);
+		fd_log_debug("Connection established to server '%s' (SCTP:%d, %d/%d streams).", buf, sock, cnx->cc_sctp_para.str_in, cnx->cc_sctp_para.str_out);
 	}
 	
@@ -857,5 +857,5 @@
 							{
 								if (TRACE_BOOL(INFO)) {
-									fd_log_debug("TLS re-handshake failed on socket %d (%s) : %s\n", conn->cc_socket, conn->cc_id, gnutls_strerror(ret));
+									fd_log_debug("TLS re-handshake failed on socket %d (%s) : %s", conn->cc_socket, conn->cc_id, gnutls_strerror(ret));
 								}
 								goto end;
@@ -902,5 +902,5 @@
 							{
 								if (TRACE_BOOL(INFO)) {
-									fd_log_debug("TLS re-handshake failed on socket %d (%s) : %s\n", conn->cc_socket, conn->cc_id, gnutls_strerror(ret));
+									fd_log_debug("TLS re-handshake failed on socket %d (%s) : %s", conn->cc_socket, conn->cc_id, gnutls_strerror(ret));
 								}
 								goto end;
@@ -1038,5 +1038,5 @@
 		const char * errorpos;
 		CHECK_GNUTLS_DO( gnutls_priority_set_direct( *session, priority, &errorpos ), 
-			{ TRACE_DEBUG(INFO, "Error in priority string '%s' at position: '%s'\n", priority, errorpos); return EINVAL; } );
+			{ TRACE_DEBUG(INFO, "Error in priority string '%s' at position: '%s'", priority, errorpos); return EINVAL; } );
 	} else {
 		CHECK_GNUTLS_DO( gnutls_priority_set( *session, fd_g_config->cnf_sec_data.prio_cache ), return EINVAL );
@@ -1075,10 +1075,10 @@
   		gnutls_credentials_type_t cred;
 		
-		fd_log_debug("TLS Session information for connection '%s':\n", conn->cc_id);
+		fd_log_debug("TLS Session information for connection '%s':", conn->cc_id);
 
 		/* print the key exchange's algorithm name */
 		GNUTLS_TRACE( kx = gnutls_kx_get (session) );
 		GNUTLS_TRACE( tmp = gnutls_kx_get_name (kx) );
-		fd_log_debug("\t - Key Exchange: %s\n", tmp);
+		fd_log_debug("\t - Key Exchange: %s", tmp);
 
 		/* Check the authentication type used and switch
@@ -1088,5 +1088,5 @@
 		{
 			case GNUTLS_CRD_IA:
-				fd_log_debug("\t - TLS/IA session\n");
+				fd_log_debug("\t - TLS/IA session");
 				break;
 
@@ -1094,14 +1094,14 @@
 				/* This returns NULL in server side. */
 				if (gnutls_psk_client_get_hint (session) != NULL)
-					fd_log_debug("\t - PSK authentication. PSK hint '%s'\n",
+					fd_log_debug("\t - PSK authentication. PSK hint '%s'",
 						gnutls_psk_client_get_hint (session));
 				/* This returns NULL in client side. */
 				if (gnutls_psk_server_get_username (session) != NULL)
-					fd_log_debug("\t - PSK authentication. Connected as '%s'\n",
+					fd_log_debug("\t - PSK authentication. Connected as '%s'",
 						gnutls_psk_server_get_username (session));
 				break;
 
 			case GNUTLS_CRD_ANON:	/* anonymous authentication */
-				fd_log_debug("\t - Anonymous DH using prime of %d bits\n",
+				fd_log_debug("\t - Anonymous DH using prime of %d bits",
 					gnutls_dh_get_prime_bits (session));
 				break;
@@ -1110,5 +1110,5 @@
 				/* Check if we have been using ephemeral Diffie-Hellman. */
 				if (kx == GNUTLS_KX_DHE_RSA || kx == GNUTLS_KX_DHE_DSS) {
-					fd_log_debug("\t - Ephemeral DH using prime of %d bits\n",
+					fd_log_debug("\t - Ephemeral DH using prime of %d bits",
 						gnutls_dh_get_prime_bits (session));
 				}
@@ -1116,5 +1116,5 @@
 #ifdef ENABLE_SRP				
 			case GNUTLS_CRD_SRP:
-				fd_log_debug("\t - SRP session with username %s\n",
+				fd_log_debug("\t - SRP session with username %s",
 					gnutls_srp_server_get_username (session));
 				break;
@@ -1122,5 +1122,5 @@
 
 			default:
-				fd_log_debug("\t - Different type of credentials for the session (%d).\n", cred);
+				fd_log_debug("\t - Different type of credentials for the session (%d).", cred);
 				break;
 
@@ -1129,21 +1129,21 @@
 		/* print the protocol's name (ie TLS 1.0) */
 		tmp = gnutls_protocol_get_name (gnutls_protocol_get_version (session));
-		fd_log_debug("\t - Protocol: %s\n", tmp);
+		fd_log_debug("\t - Protocol: %s", tmp);
 
 		/* print the certificate type of the peer. ie X.509 */
 		tmp = gnutls_certificate_type_get_name (gnutls_certificate_type_get (session));
-		fd_log_debug("\t - Certificate Type: %s\n", tmp);
+		fd_log_debug("\t - Certificate Type: %s", tmp);
 
 		/* print the compression algorithm (if any) */
 		tmp = gnutls_compression_get_name (gnutls_compression_get (session));
-		fd_log_debug("\t - Compression: %s\n", tmp);
+		fd_log_debug("\t - Compression: %s", tmp);
 
 		/* print the name of the cipher used. ie 3DES. */
 		tmp = gnutls_cipher_get_name (gnutls_cipher_get (session));
-		fd_log_debug("\t - Cipher: %s\n", tmp);
+		fd_log_debug("\t - Cipher: %s", tmp);
 
 		/* Print the MAC algorithms name. ie SHA1 */
 		tmp = gnutls_mac_get_name (gnutls_mac_get (session));
-		fd_log_debug("\t - MAC: %s\n", tmp);
+		fd_log_debug("\t - MAC: %s", tmp);
 	}
 	
@@ -1152,15 +1152,15 @@
 	if (gtret) {
 		if (TRACE_BOOL(INFO)) {
-			fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :\n", conn->cc_socket, conn->cc_remid, conn->cc_id);
+			fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :", conn->cc_socket, conn->cc_remid, conn->cc_id);
 			if (gtret & GNUTLS_CERT_INVALID)
-				fd_log_debug(" - The certificate is not trusted (unknown CA? expired?)\n");
+				fd_log_debug(" - The certificate is not trusted (unknown CA? expired?)");
 			if (gtret & GNUTLS_CERT_REVOKED)
-				fd_log_debug(" - The certificate has been revoked.\n");
+				fd_log_debug(" - The certificate has been revoked.");
 			if (gtret & GNUTLS_CERT_SIGNER_NOT_FOUND)
-				fd_log_debug(" - The certificate hasn't got a known issuer.\n");
+				fd_log_debug(" - The certificate hasn't got a known issuer.");
 			if (gtret & GNUTLS_CERT_SIGNER_NOT_CA)
-				fd_log_debug(" - The certificate signer is not a CA, or uses version 1, or 3 without basic constraints.\n");
+				fd_log_debug(" - The certificate signer is not a CA, or uses version 1, or 3 without basic constraints.");
 			if (gtret & GNUTLS_CERT_INSECURE_ALGORITHM)
-				fd_log_debug(" - The certificate signature uses a weak algorithm.\n");
+				fd_log_debug(" - The certificate signature uses a weak algorithm.");
 		}
 		return EINVAL;
@@ -1184,5 +1184,5 @@
 		time_t expiration_time, activation_time;
 		
-		fd_log_debug("TLS Certificate information for connection '%s' (%d certs provided):\n", conn->cc_id, cert_list_size);
+		fd_log_debug("TLS Certificate information for connection '%s' (%d certs provided):", conn->cc_id, cert_list_size);
 		for (i = 0; i < cert_list_size; i++)
 		{
@@ -1191,5 +1191,5 @@
 			CHECK_GNUTLS_DO( gnutls_x509_crt_import (cert, &cert_list[i], GNUTLS_X509_FMT_DER), return EINVAL);
 		
-			fd_log_debug(" Certificate %d info:\n", i);
+			fd_log_debug(" Certificate %d info:", i);
 
 			GNUTLS_TRACE( expiration_time = gnutls_x509_crt_get_expiration_time (cert) );
@@ -1203,29 +1203,30 @@
 			gnutls_x509_crt_get_serial (cert, serial, &size);
 			
-			fd_log_debug("\t - Certificate serial number: ");
 			{
 				int j;
+				char buf[1024];
+				snprintf(buf, sizeof(buf), "\t - Certificate serial number: ");
 				for (j = 0; j < size; j++) {
-					fd_log_debug("%02.2hhx", serial[j]);
+					snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), "%02.2hhx", serial[j]);
 				}
-			}
-			fd_log_debug("\n");
+				fd_log_debug(buf);
+			}
 
 			/* Extract some of the public key algorithm's parameters */
 			GNUTLS_TRACE( algo = gnutls_x509_crt_get_pk_algorithm (cert, &bits) );
-			fd_log_debug("\t - Certificate public key: %s\n",
+			fd_log_debug("\t - Certificate public key: %s",
 			      gnutls_pk_algorithm_get_name (algo));
 
 			/* Print the version of the X.509 certificate. */
-			fd_log_debug("\t - Certificate version: #%d\n",
+			fd_log_debug("\t - Certificate version: #%d",
 			      gnutls_x509_crt_get_version (cert));
 
 			size = sizeof (dn);
 			GNUTLS_TRACE( gnutls_x509_crt_get_dn (cert, dn, &size) );
-			fd_log_debug("\t - DN: %s\n", dn);
+			fd_log_debug("\t - DN: %s", dn);
 
 			size = sizeof (dn);
 			GNUTLS_TRACE( gnutls_x509_crt_get_issuer_dn (cert, dn, &size) );
-			fd_log_debug("\t - Issuer's DN: %s\n", dn);
+			fd_log_debug("\t - Issuer's DN: %s", dn);
 
 			GNUTLS_TRACE( gnutls_x509_crt_deinit (cert) );
@@ -1244,6 +1245,6 @@
 		if ((deadline != (time_t)-1) && (deadline < now)) {
 			if (TRACE_BOOL(INFO)) {
-				fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :\n", conn->cc_socket, conn->cc_remid, conn->cc_id);
-				fd_log_debug(" - The certificate %d in the chain is expired\n", i);
+				fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :", conn->cc_socket, conn->cc_remid, conn->cc_id);
+				fd_log_debug(" - The certificate %d in the chain is expired", i);
 			}
 			ret = EINVAL;
@@ -1253,6 +1254,6 @@
 		if ((deadline != (time_t)-1) && (deadline > now)) {
 			if (TRACE_BOOL(INFO)) {
-				fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :\n", conn->cc_socket, conn->cc_remid, conn->cc_id);
-				fd_log_debug(" - The certificate %d in the chain is not yet activated\n", i);
+				fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :", conn->cc_socket, conn->cc_remid, conn->cc_id);
+				fd_log_debug(" - The certificate %d in the chain is not yet activated", i);
 			}
 			ret = EINVAL;
@@ -1262,6 +1263,6 @@
 			if (!gnutls_x509_crt_check_hostname (cert, conn->cc_tls_para.cn)) {
 				if (TRACE_BOOL(INFO)) {
-					fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :\n", conn->cc_socket, conn->cc_remid, conn->cc_id);
-					fd_log_debug(" - The certificate hostname does not match '%s'\n", conn->cc_tls_para.cn);
+					fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :", conn->cc_socket, conn->cc_remid, conn->cc_id);
+					fd_log_debug(" - The certificate hostname does not match '%s'", conn->cc_tls_para.cn);
 				}
 				ret = EINVAL;
@@ -1302,5 +1303,5 @@
 		dhe = ecdh = 0;
 
-		fd_log_debug("TLS Session information for connection '%s':\n", conn->cc_id);
+		fd_log_debug("TLS Session information for connection '%s':", conn->cc_id);
 		
 		/* print the key exchange's algorithm name
@@ -1308,5 +1309,5 @@
 		GNUTLS_TRACE( kx = gnutls_kx_get (session) );
 		GNUTLS_TRACE( tmp = gnutls_kx_get_name (kx) );
-		fd_log_debug("\t- Key Exchange: %s\n", tmp);
+		fd_log_debug("\t- Key Exchange: %s", tmp);
 
 		/* Check the authentication type used and switch
@@ -1317,5 +1318,5 @@
 		{
 			case GNUTLS_CRD_IA:
-				fd_log_debug("\t - TLS/IA session\n");
+				fd_log_debug("\t - TLS/IA session");
 				break;
 
@@ -1323,5 +1324,5 @@
 			#if (defined(ENABLE_SRP) || defined(GNUTLS_VERSION_300))
 			case GNUTLS_CRD_SRP:
-				fd_log_debug("\t - SRP session with username %s\n",
+				fd_log_debug("\t - SRP session with username %s",
 					gnutls_srp_server_get_username (session));
 				break;
@@ -1332,10 +1333,10 @@
 				*/
 				if (gnutls_psk_client_get_hint (session) != NULL)
-					fd_log_debug("\t - PSK authentication. PSK hint '%s'\n",
+					fd_log_debug("\t - PSK authentication. PSK hint '%s'",
 						gnutls_psk_client_get_hint (session));
 				/* This returns NULL in client side.
 				*/
 				if (gnutls_psk_server_get_username (session) != NULL)
-					fd_log_debug("\t - PSK authentication. Connected as '%s'\n",
+					fd_log_debug("\t - PSK authentication. Connected as '%s'",
 						gnutls_psk_server_get_username (session));
 
@@ -1347,5 +1348,5 @@
 
 			case GNUTLS_CRD_ANON:      /* anonymous authentication */
-				fd_log_debug("\t - Anonymous DH using prime of %d bits\n",
+				fd_log_debug("\t - Anonymous DH using prime of %d bits",
 					gnutls_dh_get_prime_bits (session));
 				if (kx == GNUTLS_KX_ANON_ECDH)
@@ -1370,5 +1371,5 @@
 					cert_list = gnutls_certificate_get_peers (session, &cert_list_size);
 
-					fd_log_debug("\t Peer provided %d certificates.\n", cert_list_size);
+					fd_log_debug("\t Peer provided %d certificates.", cert_list_size);
 
 					if (cert_list_size > 0)
@@ -1382,5 +1383,5 @@
 						gnutls_x509_crt_import (cert, &cert_list[0], GNUTLS_X509_FMT_DER);
 
-						fd_log_debug("\t Certificate info:\n");
+						fd_log_debug("\t Certificate info:");
 
 						/* This is the preferred way of printing short information about
@@ -1390,5 +1391,5 @@
 						if (ret == 0)
 						{
-						  fd_log_debug("\t\t%s\n", cinfo.data);
+						  fd_log_debug("\t\t%s", cinfo.data);
 						  gnutls_free (cinfo.data);
 						}
@@ -1396,6 +1397,6 @@
 						if (conn->cc_tls_para.cn) {
 							if (!gnutls_x509_crt_check_hostname (cert, conn->cc_tls_para.cn)) {
-								fd_log_debug("\tTLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :\n", conn->cc_socket, conn->cc_remid, conn->cc_id);
-								fd_log_debug("\t - The certificate hostname does not match '%s'\n", conn->cc_tls_para.cn);
+								fd_log_debug("\tTLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :", conn->cc_socket, conn->cc_remid, conn->cc_id);
+								fd_log_debug("\t - The certificate hostname does not match '%s'", conn->cc_tls_para.cn);
 								gnutls_x509_crt_deinit (cert);
 								return GNUTLS_E_CERTIFICATE_ERROR;
@@ -1415,8 +1416,8 @@
 
 		if (ecdh != 0)
-			fd_log_debug("\t - Ephemeral ECDH using curve %s\n",
+			fd_log_debug("\t - Ephemeral ECDH using curve %s",
 				gnutls_ecc_curve_get_name (gnutls_ecc_curve_get (session)));
 		else if (dhe != 0)
-			fd_log_debug("\t - Ephemeral DH using prime of %d bits\n",
+			fd_log_debug("\t - Ephemeral DH using prime of %d bits",
 				gnutls_dh_get_prime_bits (session));
 
@@ -1424,5 +1425,5 @@
 		*/
 		tmp = gnutls_protocol_get_name (gnutls_protocol_get_version (session));
-		fd_log_debug("\t - Protocol: %s\n", tmp);
+		fd_log_debug("\t - Protocol: %s", tmp);
 
 		/* print the certificate type of the peer.
@@ -1430,10 +1431,10 @@
 		*/
 		tmp = gnutls_certificate_type_get_name (gnutls_certificate_type_get (session));
-		fd_log_debug("\t - Certificate Type: %s\n", tmp);
+		fd_log_debug("\t - Certificate Type: %s", tmp);
 
 		/* print the compression algorithm (if any)
 		*/
 		tmp = gnutls_compression_get_name (gnutls_compression_get (session));
-		fd_log_debug("\t - Compression: %s\n", tmp);
+		fd_log_debug("\t - Compression: %s", tmp);
 
 		/* print the name of the cipher used.
@@ -1441,5 +1442,5 @@
 		*/
 		tmp = gnutls_cipher_get_name (gnutls_cipher_get (session));
-		fd_log_debug("\t - Cipher: %s\n", tmp);
+		fd_log_debug("\t - Cipher: %s", tmp);
 
 		/* Print the MAC algorithms name.
@@ -1447,5 +1448,5 @@
 		*/
 		tmp = gnutls_mac_get_name (gnutls_mac_get (session));
-		fd_log_debug("\t - MAC: %s\n", tmp);
+		fd_log_debug("\t - MAC: %s", tmp);
 	
 	}
@@ -1456,16 +1457,16 @@
 	CHECK_GNUTLS_DO( gnutls_certificate_verify_peers2 (session, &status), return GNUTLS_E_CERTIFICATE_ERROR );
 	if (TRACE_BOOL(INFO) && (status & GNUTLS_CERT_INVALID)) {
-		fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :\n", conn->cc_socket, conn->cc_remid, conn->cc_id);
+		fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :", conn->cc_socket, conn->cc_remid, conn->cc_id);
 		if (status & GNUTLS_CERT_SIGNER_NOT_FOUND)
-			fd_log_debug(" - The certificate hasn't got a known issuer.\n");
+			fd_log_debug(" - The certificate hasn't got a known issuer.");
 
 		if (status & GNUTLS_CERT_REVOKED)
-			fd_log_debug(" - The certificate has been revoked.\n");
+			fd_log_debug(" - The certificate has been revoked.");
 
 		if (status & GNUTLS_CERT_EXPIRED)
-			fd_log_debug(" - The certificate has expired.\n");
+			fd_log_debug(" - The certificate has expired.");
 
 		if (status & GNUTLS_CERT_NOT_ACTIVATED)
-			fd_log_debug(" - The certificate is not yet activated.\n");
+			fd_log_debug(" - The certificate is not yet activated.");
 	}	
 	if (status & GNUTLS_CERT_INVALID)
@@ -1480,5 +1481,5 @@
 	if ((!hostname_verified) && (conn->cc_tls_para.cn)) {
 		if (gnutls_certificate_type_get (session) != GNUTLS_CRT_X509) {
-			TRACE_DEBUG(INFO, "TLS: Remote credentials are not x509, rejected on socket %d (Remote: '%s')(Connection: '%s') :\n", conn->cc_socket, conn->cc_remid, conn->cc_id);
+			TRACE_DEBUG(INFO, "TLS: Remote credentials are not x509, rejected on socket %d (Remote: '%s')(Connection: '%s') :", conn->cc_socket, conn->cc_remid, conn->cc_id);
 			return GNUTLS_E_CERTIFICATE_ERROR;
 		}
@@ -1493,6 +1494,6 @@
 		if (!gnutls_x509_crt_check_hostname (cert, conn->cc_tls_para.cn)) {
 			if (TRACE_BOOL(INFO)) {
-				fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :\n", conn->cc_socket, conn->cc_remid, conn->cc_id);
-				fd_log_debug(" - The certificate hostname does not match '%s'\n", conn->cc_tls_para.cn);
+				fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :", conn->cc_socket, conn->cc_remid, conn->cc_id);
+				fd_log_debug(" - The certificate hostname does not match '%s'", conn->cc_tls_para.cn);
 			}
 			gnutls_x509_crt_deinit (cert);
@@ -1573,5 +1574,5 @@
 			{
 				if (TRACE_BOOL(INFO)) {
-					fd_log_debug("TLS Handshake failed on socket %d (%s) : %s\n", conn->cc_socket, conn->cc_id, gnutls_strerror(ret));
+					fd_log_debug("TLS Handshake failed on socket %d (%s) : %s", conn->cc_socket, conn->cc_id, gnutls_strerror(ret));
 				}
 				fd_cnx_markerror(conn);
Index: libfdcore/config.c
===================================================================
--- libfdcore/config.c	(revision 965)
+++ libfdcore/config.c	(revision 974)
@@ -86,23 +86,23 @@
 		return;
 	
-	fd_log_debug("-- Configuration :\n");
-	fd_log_debug("  Debug trace level ...... : %+d\n", fd_g_debug_lvl);
-	fd_log_debug("  Configuration file ..... : %s\n", fd_g_config->cnf_file);
-	fd_log_debug("  Diameter Identity ...... : %s (l:%Zi)\n", fd_g_config->cnf_diamid, fd_g_config->cnf_diamid_len);
-	fd_log_debug("  Diameter Realm ......... : %s (l:%Zi)\n", fd_g_config->cnf_diamrlm, fd_g_config->cnf_diamrlm_len);
-	fd_log_debug("  Tc Timer ............... : %u\n", fd_g_config->cnf_timer_tc);
-	fd_log_debug("  Tw Timer ............... : %u\n", fd_g_config->cnf_timer_tw);
-	fd_log_debug("  Local port ............. : %hu\n", fd_g_config->cnf_port);
-	fd_log_debug("  Local secure port ...... : %hu\n", fd_g_config->cnf_port_tls);
-	fd_log_debug("  Number of SCTP streams . : %hu\n", fd_g_config->cnf_sctp_str);
-	fd_log_debug("  Number of server threads : %hu\n", fd_g_config->cnf_dispthr);
+	fd_log_debug("-- Configuration :");
+	fd_log_debug("  Debug trace level ...... : %+d", fd_g_debug_lvl);
+	fd_log_debug("  Configuration file ..... : %s", fd_g_config->cnf_file);
+	fd_log_debug("  Diameter Identity ...... : %s (l:%Zi)", fd_g_config->cnf_diamid, fd_g_config->cnf_diamid_len);
+	fd_log_debug("  Diameter Realm ......... : %s (l:%Zi)", fd_g_config->cnf_diamrlm, fd_g_config->cnf_diamrlm_len);
+	fd_log_debug("  Tc Timer ............... : %u", fd_g_config->cnf_timer_tc);
+	fd_log_debug("  Tw Timer ............... : %u", fd_g_config->cnf_timer_tw);
+	fd_log_debug("  Local port ............. : %hu", fd_g_config->cnf_port);
+	fd_log_debug("  Local secure port ...... : %hu", fd_g_config->cnf_port_tls);
+	fd_log_debug("  Number of SCTP streams . : %hu", fd_g_config->cnf_sctp_str);
+	fd_log_debug("  Number of server threads : %hu", fd_g_config->cnf_dispthr);
 	if (FD_IS_LIST_EMPTY(&fd_g_config->cnf_endpoints)) {
-		fd_log_debug("  Local endpoints ........ : Default (use all available)\n");
+		fd_log_debug("  Local endpoints ........ : Default (use all available)");
 	} else {
-		fd_log_debug("  Local endpoints ........ : \n");
+		fd_log_debug("  Local endpoints ........ : ");
 		fd_ep_dump( 29, &fd_g_config->cnf_endpoints );
 	}
 	if (FD_IS_LIST_EMPTY(&fd_g_config->cnf_apps)) {
-		fd_log_debug("  Local applications ..... : (none)\n");
+		fd_log_debug("  Local applications ..... : (none)");
 	} else {
 		struct fd_list * li = fd_g_config->cnf_apps.next;
@@ -111,5 +111,5 @@
 			struct fd_app * app = (struct fd_app *)li;
 			if (li != fd_g_config->cnf_apps.next) fd_log_debug("                             ");
-			fd_log_debug("App: %u\t%s%s\tVnd: %u\n", 
+			fd_log_debug("App: %u\t%s%s\tVnd: %u", 
 					app->appid,
 					app->flags.auth ? "Au" : "--",
@@ -120,27 +120,27 @@
 	}
 	
-	fd_log_debug("  Flags : - IP ........... : %s\n", fd_g_config->cnf_flags.no_ip4 ? "DISABLED" : "Enabled");
-	fd_log_debug("          - IPv6 ......... : %s\n", fd_g_config->cnf_flags.no_ip6 ? "DISABLED" : "Enabled");
-	fd_log_debug("          - Relay app .... : %s\n", fd_g_config->cnf_flags.no_fwd ? "DISABLED" : "Enabled");
-	fd_log_debug("          - TCP .......... : %s\n", fd_g_config->cnf_flags.no_tcp ? "DISABLED" : "Enabled");
+	fd_log_debug("  Flags : - IP ........... : %s", fd_g_config->cnf_flags.no_ip4 ? "DISABLED" : "Enabled");
+	fd_log_debug("          - IPv6 ......... : %s", fd_g_config->cnf_flags.no_ip6 ? "DISABLED" : "Enabled");
+	fd_log_debug("          - Relay app .... : %s", fd_g_config->cnf_flags.no_fwd ? "DISABLED" : "Enabled");
+	fd_log_debug("          - TCP .......... : %s", fd_g_config->cnf_flags.no_tcp ? "DISABLED" : "Enabled");
 	#ifdef DISABLE_SCTP
-	fd_log_debug("          - SCTP ......... : DISABLED (at compilation)\n");
+	fd_log_debug("          - SCTP ......... : DISABLED (at compilation)");
 	#else /* DISABLE_SCTP */
-	fd_log_debug("          - SCTP ......... : %s\n", fd_g_config->cnf_flags.no_sctp ? "DISABLED" : "Enabled");
+	fd_log_debug("          - SCTP ......... : %s", fd_g_config->cnf_flags.no_sctp ? "DISABLED" : "Enabled");
 	#endif /* DISABLE_SCTP */
-	fd_log_debug("          - Pref. proto .. : %s\n", fd_g_config->cnf_flags.pr_tcp ? "TCP" : "SCTP");
-	fd_log_debug("          - TLS method ... : %s\n", fd_g_config->cnf_flags.tls_alg ? "INBAND" : "Separate port");
-	
-	fd_log_debug("  TLS :   - Certificate .. : %s\n", fd_g_config->cnf_sec_data.cert_file ?: "(NONE)");
-	fd_log_debug("          - Private key .. : %s\n", fd_g_config->cnf_sec_data.key_file ?: "(NONE)");
-	fd_log_debug("          - CA (trust) ... : %s (%d certs)\n", fd_g_config->cnf_sec_data.ca_file ?: "(none)", fd_g_config->cnf_sec_data.ca_file_nr);
-	fd_log_debug("          - CRL .......... : %s\n", fd_g_config->cnf_sec_data.crl_file ?: "(none)");
-	fd_log_debug("          - Priority ..... : %s\n", fd_g_config->cnf_sec_data.prio_string ?: "(default: '" GNUTLS_DEFAULT_PRIORITY "')");
+	fd_log_debug("          - Pref. proto .. : %s", fd_g_config->cnf_flags.pr_tcp ? "TCP" : "SCTP");
+	fd_log_debug("          - TLS method ... : %s", fd_g_config->cnf_flags.tls_alg ? "INBAND" : "Separate port");
+	
+	fd_log_debug("  TLS :   - Certificate .. : %s", fd_g_config->cnf_sec_data.cert_file ?: "(NONE)");
+	fd_log_debug("          - Private key .. : %s", fd_g_config->cnf_sec_data.key_file ?: "(NONE)");
+	fd_log_debug("          - CA (trust) ... : %s (%d certs)", fd_g_config->cnf_sec_data.ca_file ?: "(none)", fd_g_config->cnf_sec_data.ca_file_nr);
+	fd_log_debug("          - CRL .......... : %s", fd_g_config->cnf_sec_data.crl_file ?: "(none)");
+	fd_log_debug("          - Priority ..... : %s", fd_g_config->cnf_sec_data.prio_string ?: "(default: '" GNUTLS_DEFAULT_PRIORITY "')");
 	if (fd_g_config->cnf_sec_data.dh_file)
-		fd_log_debug("          - DH file ...... : %s\n", fd_g_config->cnf_sec_data.dh_file);
+		fd_log_debug("          - DH file ...... : %s", fd_g_config->cnf_sec_data.dh_file);
 	else
-		fd_log_debug("          - DH bits ...... : %d\n", fd_g_config->cnf_sec_data.dh_bits ?: GNUTLS_DEFAULT_DHBITS);
-	
-	fd_log_debug("  Origin-State-Id ........ : %u\n", fd_g_config->cnf_orstateid);
+		fd_log_debug("          - DH bits ...... : %d", fd_g_config->cnf_sec_data.dh_bits ?: GNUTLS_DEFAULT_DHBITS);
+	
+	fd_log_debug("  Origin-State-Id ........ : %u", fd_g_config->cnf_orstateid);
 }
 
@@ -172,5 +172,5 @@
 		if (ferror(pemfile)) {
 			int err = errno;
-			TRACE_DEBUG(INFO, "An error occurred while reading file: %s\n", strerror(err));
+			TRACE_DEBUG(INFO, "An error occurred while reading file: %s", strerror(err));
 			return err; 
 		}
@@ -201,6 +201,6 @@
   gnutls_x509_crt_get_dn (cert, name, &name_size);
 
-  fd_log_debug("\tSubject: %s\n", name);
-  fd_log_debug("\tIssuer: %s\n", issuer_name);
+  fd_log_debug("\tSubject: %s", name);
+  fd_log_debug("\tIssuer: %s", issuer_name);
 
   if (issuer != NULL)
@@ -209,5 +209,5 @@
       gnutls_x509_crt_get_dn (issuer, issuer_name, &issuer_name_size);
 
-      fd_log_debug("\tVerified against: %s\n", issuer_name);
+      fd_log_debug("\tVerified against: %s", issuer_name);
     }
 
@@ -217,8 +217,8 @@
       gnutls_x509_crl_get_issuer_dn (crl, issuer_name, &issuer_name_size);
 
-      fd_log_debug("\tVerified against CRL of: %s\n", issuer_name);
+      fd_log_debug("\tVerified against CRL of: %s", issuer_name);
     }
 
-  fd_log_debug("\tVerification output: %x\n\n", verification_output);
+  fd_log_debug("\tVerification output: %x", verification_output);
 
   return 0;
@@ -248,5 +248,5 @@
 	if (fddin == NULL) {
 		int ret = errno;
-		TRACE_ERROR("Unable to open configuration file for reading; tried the following locations: %s%s%s; Error: %s\n",
+		TRACE_ERROR("Unable to open configuration file for reading; tried the following locations: %s%s%s; Error: %s",
 				  orig ?: "", orig? " and " : "", fd_g_config->cnf_file, strerror(ret));
 		return ret;
@@ -349,5 +349,5 @@
 					char buf[1024];
 					sSA_DUMP_NODE( buf, sizeof(buf), &ep->sa, NI_NUMERICHOST );
-					fd_log_debug("Info: Removing local address conflicting with the flags no_IP / no_IP6 : %s\n", buf);
+					fd_log_debug("Info: Removing local address conflicting with the flags no_IP / no_IP6 : %s", buf);
 				}
 				free(ep);
@@ -380,5 +380,5 @@
 		if (!stream) {
 			int err = errno;
-			TRACE_DEBUG(INFO, "An error occurred while opening '%s': %s\n", fd_g_config->cnf_sec_data.cert_file, strerror(err));
+			TRACE_DEBUG(INFO, "An error occurred while opening '%s': %s", fd_g_config->cnf_sec_data.cert_file, strerror(err));
 			return err; 
 		}
@@ -441,13 +441,13 @@
 			if (output & GNUTLS_CERT_INVALID)
 			{
-				fd_log_debug("TLS: Local certificate chain '%s' is invalid :\n", fd_g_config->cnf_sec_data.cert_file);
+				fd_log_debug("TLS: Local certificate chain '%s' is invalid :", fd_g_config->cnf_sec_data.cert_file);
 				if (output & GNUTLS_CERT_SIGNER_NOT_FOUND)
-					fd_log_debug(" - The certificate hasn't got a known issuer.\n");
+					fd_log_debug(" - The certificate hasn't got a known issuer.");
 				if (output & GNUTLS_CERT_SIGNER_NOT_CA)
-					fd_log_debug(" - The certificate signer is not a CA, or uses version 1, or 3 without basic constraints.\n");
+					fd_log_debug(" - The certificate signer is not a CA, or uses version 1, or 3 without basic constraints.");
 				if (output & GNUTLS_CERT_NOT_ACTIVATED)
-					fd_log_debug(" - The certificate is not yet activated.\n");
+					fd_log_debug(" - The certificate is not yet activated.");
 				if (output & GNUTLS_CERT_EXPIRED)
-					fd_log_debug(" - The certificate is expired.\n");
+					fd_log_debug(" - The certificate is expired.");
 				return EINVAL;
 			}
@@ -456,5 +456,5 @@
 			if (!gnutls_x509_crt_check_hostname (certs[0], fd_g_config->cnf_diamid))
 			{
-				fd_log_debug("TLS: The certificate owner does not match the hostname '%s'\n", fd_g_config->cnf_diamid);
+				fd_log_debug("TLS: The certificate owner does not match the hostname '%s'", fd_g_config->cnf_diamid);
 				return EINVAL;
 			}
@@ -484,15 +484,15 @@
 				
 			if (verify) {
-				fd_log_debug("TLS: Local certificate chain '%s' is invalid :\n", fd_g_config->cnf_sec_data.cert_file);
+				fd_log_debug("TLS: Local certificate chain '%s' is invalid :", fd_g_config->cnf_sec_data.cert_file);
 				if (verify & GNUTLS_CERT_INVALID)
-					fd_log_debug(" - The certificate is not trusted (unknown CA? expired?)\n");
+					fd_log_debug(" - The certificate is not trusted (unknown CA? expired?)");
 				if (verify & GNUTLS_CERT_REVOKED)
-					fd_log_debug(" - The certificate has been revoked.\n");
+					fd_log_debug(" - The certificate has been revoked.");
 				if (verify & GNUTLS_CERT_SIGNER_NOT_FOUND)
-					fd_log_debug(" - The certificate hasn't got a known issuer.\n");
+					fd_log_debug(" - The certificate hasn't got a known issuer.");
 				if (verify & GNUTLS_CERT_SIGNER_NOT_CA)
-					fd_log_debug(" - The certificate signer is not a CA, or uses version 1, or 3 without basic constraints.\n");
+					fd_log_debug(" - The certificate signer is not a CA, or uses version 1, or 3 without basic constraints.");
 				if (verify & GNUTLS_CERT_INSECURE_ALGORITHM)
-					fd_log_debug(" - The certificate signature uses a weak algorithm.\n");
+					fd_log_debug(" - The certificate signature uses a weak algorithm.");
 				return EINVAL;
 			}
@@ -500,6 +500,6 @@
 			/* Check the local Identity is valid with the certificate */
 			if (!gnutls_x509_crt_check_hostname (certs[0], fd_g_config->cnf_diamid)) {
-				fd_log_debug("TLS: Local certificate '%s' is invalid :\n", fd_g_config->cnf_sec_data.cert_file);
-				fd_log_debug(" - The certificate hostname does not match '%s'\n", fd_g_config->cnf_diamid);
+				fd_log_debug("TLS: Local certificate '%s' is invalid :", fd_g_config->cnf_sec_data.cert_file);
+				fd_log_debug(" - The certificate hostname does not match '%s'", fd_g_config->cnf_diamid);
 				return EINVAL;
 			}
@@ -513,6 +513,6 @@
 				GNUTLS_TRACE( deadline = gnutls_x509_crt_get_expiration_time(certs[i]) );
 				if ((deadline != (time_t)-1) && (deadline < now)) {
-					fd_log_debug("TLS: Local certificate chain '%s' is invalid :\n", fd_g_config->cnf_sec_data.cert_file);
-					fd_log_debug(" - The certificate %d in the chain is expired\n", i);
+					fd_log_debug("TLS: Local certificate chain '%s' is invalid :", fd_g_config->cnf_sec_data.cert_file);
+					fd_log_debug(" - The certificate %d in the chain is expired", i);
 					return EINVAL;
 				}
@@ -520,6 +520,6 @@
 				GNUTLS_TRACE( deadline = gnutls_x509_crt_get_activation_time(certs[i]) );
 				if ((deadline != (time_t)-1) && (deadline > now)) {
-					fd_log_debug("TLS: Local certificate chain '%s' is invalid :\n", fd_g_config->cnf_sec_data.cert_file);
-					fd_log_debug(" - The certificate %d in the chain is not yet activated\n", i);
+					fd_log_debug("TLS: Local certificate chain '%s' is invalid :", fd_g_config->cnf_sec_data.cert_file);
+					fd_log_debug(" - The certificate %d in the chain is not yet activated", i);
 					return EINVAL;
 				}
@@ -551,5 +551,5 @@
 		if (!stream) {
 			int err = errno;
-			TRACE_DEBUG(INFO, "An error occurred while opening '%s': %s\n", fd_g_config->cnf_sec_data.dh_file, strerror(err));
+			TRACE_DEBUG(INFO, "An error occurred while opening '%s': %s", fd_g_config->cnf_sec_data.dh_file, strerror(err));
 			return err; 
 		}
@@ -573,5 +573,5 @@
 			if (ferror(stream)) {
 				int err = errno;
-				TRACE_DEBUG(INFO, "An error occurred while reading '%s': %s\n", fd_g_config->cnf_sec_data.dh_file, strerror(err));
+				TRACE_DEBUG(INFO, "An error occurred while reading '%s': %s", fd_g_config->cnf_sec_data.dh_file, strerror(err));
 				return err; 
 			}
Index: libfdcore/core.c
===================================================================
--- libfdcore/core.c	(revision 961)
+++ libfdcore/core.c	(revision 974)
@@ -131,5 +131,5 @@
 			
 			default:
-				TRACE_DEBUG(INFO, "Unexpected event in the main event queue (%d), ignored.\n", code);
+				TRACE_DEBUG(INFO, "Unexpected event in the main event queue (%d), ignored.", code);
 		}
 	}
@@ -154,5 +154,5 @@
 	CHECK_FCT_DO( fd_event_trig_fini(), );
 	
-	fd_log_debug(FD_PROJECT_BINARY " framework is terminated.\n");
+	fd_log_debug(FD_PROJECT_BINARY " framework is terminated.");
 	
 	fd_libproto_fini();
Index: libfdcore/endpoints.c
===================================================================
--- libfdcore/endpoints.c	(revision 946)
+++ libfdcore/endpoints.c	(revision 974)
@@ -64,5 +64,5 @@
 		fd_ep_dump( 4, list );
 		TRACE_DEBUG(ANNOYING, "  DEBUG:fd_ep_add_merge  Adding:");
-		fd_log_debug("    %s {%s%s%s%s}\n", buf,
+		fd_log_debug("    %s {%s%s%s%s}", buf,
 				(flags & EP_FL_CONF) 	? "C" : "-",
 				(flags & EP_FL_DISC)	    ? "D" : "-",
Index: libfdcore/events.c
===================================================================
--- libfdcore/events.c	(revision 740)
+++ libfdcore/events.c	(revision 974)
@@ -178,5 +178,5 @@
 	for (li = trig_list.next; li != &trig_list; li = li->next) {
 		struct trig_item *t = li->o;
-		fd_log_debug("  Trigger %d, module '%s': %p\n", t->trig_value, t->trig_module, t->cb);
+		fd_log_debug("  Trigger %d, module '%s': %p", t->trig_value, t->trig_module, t->cb);
 	}
 	
Index: libfdcore/extensions.c
===================================================================
--- libfdcore/extensions.c	(revision 837)
+++ libfdcore/extensions.c	(revision 974)
@@ -82,10 +82,10 @@
 	struct fd_list * li;
 	
-	fd_log_debug("Dumping extensions list :\n");
+	fd_log_debug("Dumping extensions list :");
 	
 	for (li = ext_list.next; li != &ext_list; li = li->next)
 	{
 		struct fd_ext_info * ext = (struct fd_ext_info *)li;
-		fd_log_debug(" - '%s'[%s] is %sloaded\n", ext->filename, ext->conffile?:"no conf", ext->handler ? "" : "not ");
+		fd_log_debug(" - '%s'[%s] is %sloaded", ext->filename, ext->conffile?:"no conf", ext->handler ? "" : "not ");
 	}
 }
@@ -126,5 +126,5 @@
 		if (li == &ext->chain) {
 			/* the dependency was not found */
-			TRACE_DEBUG(NONE, "Error: extension [%s] depends on [%s] which was not loaded first.\nPlease fix your configuration file.",
+			TRACE_DEBUG(NONE, "Error: extension [%s] depends on [%s] which was not loaded first. Please fix your configuration file.",
 				ext->ext_name, ext->depends[i]);
 			return ESRCH;
@@ -162,10 +162,10 @@
 		if (ext->handler == NULL) {
 			/* An error occured */
-			TRACE_DEBUG( NONE, "Loading of extension %s failed:\n %s", ext->filename, dlerror());
+			TRACE_DEBUG( NONE, "Loading of extension %s failed: %s", ext->filename, dlerror());
 			#ifdef DEBUG
 			ext->handler = dlopen(ext->filename, RTLD_LAZY | RTLD_GLOBAL);
 			if (ext->handler) {
 				if (!check_dependencies(ext)) {
-					TRACE_DEBUG( NONE, "In addition, all declared dependencies are satisfied (Internal Error!)\n");
+					TRACE_DEBUG( NONE, "In addition, all declared dependencies are satisfied (Internal Error!)");
 				}
 			}
@@ -182,5 +182,5 @@
 		if (fd_ext_init == NULL) {
 			/* An error occured */
-			TRACE_DEBUG( NONE, "Unable to resolve symbol 'fd_ext_init' for extension %s:\n %s\n", ext->filename, dlerror());
+			TRACE_DEBUG( NONE, "Unable to resolve symbol 'fd_ext_init' for extension %s: %s", ext->filename, dlerror());
 			return EINVAL;
 		}
@@ -201,5 +201,5 @@
 		if (ret != 0) {
 			/* The extension was unable to load cleanly */
-			TRACE_DEBUG( NONE, "Extension %s returned an error during initialization: %s\n", ext->filename, strerror(ret));
+			TRACE_DEBUG( NONE, "Extension %s returned an error during initialization: %s", ext->filename, strerror(ret));
 			return ret;
 		}
@@ -239,5 +239,5 @@
 			TRACE_DEBUG (FULL, "Unloading %s", ext->ext_name ?: ext->filename);
 			if ( dlclose(ext->handler) != 0 ) {
-				TRACE_DEBUG (INFO, "Unloading [%s] failed : %s\n", ext->ext_name ?: ext->filename, dlerror());
+				TRACE_DEBUG (INFO, "Unloading [%s] failed : %s", ext->ext_name ?: ext->filename, dlerror());
 			}
 		}
Index: libfdcore/fdd.l
===================================================================
--- libfdcore/fdd.l	(revision 969)
+++ libfdcore/fdd.l	(revision 974)
@@ -84,5 +84,5 @@
 int globerrfct(const char *epath, int eerrno)
 {
-	TRACE_ERROR("Failed to scan %s: %s\n", epath, strerror(eerrno));
+	TRACE_ERROR("Failed to scan %s: %s", epath, strerror(eerrno));
 	return 1;
 }
@@ -119,5 +119,5 @@
 			if (buf[yyleng-2] != '"')
 			{
-				TRACE_ERROR("Unterminated string: %s\n", yytext);
+				TRACE_ERROR("Unterminated string: %s", yytext);
 				return LEX_ERROR;
 			}
@@ -126,5 +126,5 @@
 			if (current_nested_level >= MAX_NESTED_CONF_FILES)
 			{
-				TRACE_ERROR("Too many recursion levels in configuration files includes\n");
+				TRACE_ERROR("Too many recursion levels in configuration files includes");
 				return LEX_ERROR;
 			}
@@ -135,10 +135,10 @@
 			if (globerror == GLOB_NOSPACE)
 			{
-				TRACE_ERROR("Not enough memory to parse include directive.\n");
+				TRACE_ERROR("Not enough memory to parse include directive.");
 				return LEX_ERROR;
 			}
 			if (globerror == GLOB_ABORTED)
 			{
-				TRACE_ERROR("An error was encountered in include directive.\n");
+				TRACE_ERROR("An error was encountered in include directive.");
 				return LEX_ERROR;
 			}
@@ -150,5 +150,5 @@
 			if (globerror)
 			{
-				TRACE_ERROR("Unexpected error in glob (%d).\n", globerror);
+				TRACE_ERROR("Unexpected error in glob (%d).", globerror);
 				return LEX_ERROR;
 			}
@@ -234,5 +234,5 @@
 				if (ret != 1) {
 					/* No matching: an error occurred */
-					TRACE_ERROR("Unable to convert the value '%s' to a valid number: %s\n", yytext, strerror(errno));
+					TRACE_ERROR("Unable to convert the value '%s' to a valid number: %s", yytext, strerror(errno));
 					return LEX_ERROR; /* trig an error in yacc parser */
 					/* Maybe we could REJECT instead of failing here? */
@@ -277,5 +277,5 @@
 	/* Unrecognized character */
 <*>.			{
-				TRACE_ERROR("Unrecognized text on line %d col %d: '%s'.\n", yylloc->first_line, yylloc->first_column, yytext);
+				TRACE_ERROR("Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext);
 			 	return LEX_ERROR; 
 			}
Index: libfdcore/fdd.y
===================================================================
--- libfdcore/fdd.y	(revision 969)
+++ libfdcore/fdd.y	(revision 974)
@@ -63,9 +63,9 @@
 {
 	if (ploc->first_line != ploc->last_line) {
-		TRACE_ERROR("%s:%d.%d-%d.%d : %s\n", conf->cnf_file, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);
+		TRACE_ERROR("%s:%d.%d-%d.%d : %s", conf->cnf_file, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);
 	} else if (ploc->first_column != ploc->last_column) {
-		TRACE_ERROR("%s:%d.%d-%d : %s\n", conf->cnf_file, ploc->first_line, ploc->first_column, ploc->last_column, s);
+		TRACE_ERROR("%s:%d.%d-%d : %s", conf->cnf_file, ploc->first_line, ploc->first_column, ploc->last_column, s);
 	} else {
-		TRACE_ERROR("%s:%d.%d : %s\n", conf->cnf_file, ploc->first_line, ploc->first_column, s);
+		TRACE_ERROR("%s:%d.%d : %s", conf->cnf_file, ploc->first_line, ploc->first_column, s);
 	}
 }
@@ -504,5 +504,5 @@
 				if (fd == NULL) {
 					int ret = errno;
-					TRACE_ERROR("Unable to open certificate file %s for reading: %s\n", $3, strerror(ret));
+					TRACE_ERROR("Unable to open certificate file %s for reading: %s", $3, strerror(ret));
 					yyerror (&yylloc, conf, "Error on file name"); 
 					YYERROR;
@@ -512,5 +512,5 @@
 				if (fd == NULL) {
 					int ret = errno;
-					TRACE_ERROR("Unable to open private key file %s for reading: %s\n", $5, strerror(ret));
+					TRACE_ERROR("Unable to open private key file %s for reading: %s", $5, strerror(ret));
 					yyerror (&yylloc, conf, "Error on file name"); 
 					YYERROR;
@@ -535,5 +535,5 @@
 				if (fd == NULL) {
 					int ret = errno;
-					TRACE_ERROR("Unable to open CA file %s for reading: %s\n", $3, strerror(ret));
+					TRACE_ERROR("Unable to open CA file %s for reading: %s", $3, strerror(ret));
 					yyerror (&yylloc, conf, "Error on file name"); 
 					YYERROR;
@@ -575,5 +575,5 @@
 				if (fd == NULL) {
 					int ret = errno;
-					TRACE_ERROR("Unable to open CRL file %s for reading: %s\n", $3, strerror(ret));
+					TRACE_ERROR("Unable to open CRL file %s for reading: %s", $3, strerror(ret));
 					yyerror (&yylloc, conf, "Error on file name"); 
 					YYERROR;
@@ -618,5 +618,5 @@
 							&err_pos),
 						{ yyerror (&yylloc, conf, "Error setting Priority parameter.");
-						  TRACE_ERROR("Error at position : %s\n", err_pos);
+						  TRACE_ERROR("Error at position : %s", err_pos);
 						  YYERROR; } );
 			}
@@ -635,5 +635,5 @@
 				if (fd == NULL) {
 					int ret = errno;
-					TRACE_ERROR("Unable to open DH file %s for reading: %s\n", $3, strerror(ret));
+					TRACE_ERROR("Unable to open DH file %s for reading: %s", $3, strerror(ret));
 					yyerror (&yylloc, conf, "Error on file name"); 
 					YYERROR;
Index: libfdcore/p_ce.c
===================================================================
--- libfdcore/p_ce.c	(revision 935)
+++ libfdcore/p_ce.c	(revision 974)
@@ -306,5 +306,5 @@
 				if (fd_os_almostcasesrch(hdr->avp_value->os.data, hdr->avp_value->os.len, 
 							peer->p_hdr.info.pi_diamid, peer->p_hdr.info.pi_diamidlen, NULL)) {
-					TRACE_DEBUG(INFO, "Received a message with Origin-Host set to '%.*s' while expecting '%s'\n", 
+					TRACE_DEBUG(INFO, "Received a message with Origin-Host set to '%.*s' while expecting '%s'", 
 							hdr->avp_value->os.len, hdr->avp_value->os.data, peer->p_hdr.info.pi_diamid);
 					error->pei_errcode = "DIAMETER_AVP_NOT_ALLOWED";
@@ -778,5 +778,5 @@
 				{
 					/* Handshake failed ...  */
-					fd_log_debug("TLS Handshake failed with peer '%s', resetting the connection\n", peer->p_hdr.info.pi_diamid);
+					fd_log_debug("TLS Handshake failed with peer '%s', resetting the connection", peer->p_hdr.info.pi_diamid);
 					goto cleanup;
 				} );
@@ -831,5 +831,5 @@
 		size_t len = strlen(peer->p_hdr.info.config.pic_realm);
 		if (fd_os_almostcasesrch(peer->p_hdr.info.config.pic_realm, len, peer->p_hdr.info.runtime.pir_realm, peer->p_hdr.info.runtime.pir_realmlen, NULL)) {
-			TRACE_DEBUG(INFO, "Rejected CER from peer '%s', realm mismatch with configured value (returning DIAMETER_UNKNOWN_PEER).\n", peer->p_hdr.info.pi_diamid);
+			TRACE_DEBUG(INFO, "Rejected CER from peer '%s', realm mismatch with configured value (returning DIAMETER_UNKNOWN_PEER).", peer->p_hdr.info.pi_diamid);
 			pei.pei_errcode = "DIAMETER_UNKNOWN_PEER"; /* maybe AVP_NOT_ALLOWED would be better fit? */
 			goto error_abort;
@@ -846,5 +846,5 @@
 		int res = fd_peer_validate( peer );
 		if (res < 0) {
-			TRACE_DEBUG(INFO, "Rejected CER from peer '%s', validation failed (returning DIAMETER_UNKNOWN_PEER).\n", peer->p_hdr.info.pi_diamid);
+			TRACE_DEBUG(INFO, "Rejected CER from peer '%s', validation failed (returning DIAMETER_UNKNOWN_PEER).", peer->p_hdr.info.pi_diamid);
 			pei.pei_errcode = "DIAMETER_UNKNOWN_PEER";
 			goto error_abort;
@@ -931,5 +931,5 @@
 			{
 				/* Handshake failed ...  */
-				fd_log_debug("TLS Handshake failed with peer '%s', resetting the connection\n", peer->p_hdr.info.pi_diamid);
+				fd_log_debug("TLS Handshake failed with peer '%s', resetting the connection", peer->p_hdr.info.pi_diamid);
 				goto cleanup;
 			} );
Index: libfdcore/p_cnx.c
===================================================================
--- libfdcore/p_cnx.c	(revision 931)
+++ libfdcore/p_cnx.c	(revision 974)
@@ -90,5 +90,5 @@
 		ret = getaddrinfo(peer->p_hdr.info.pi_diamid, NULL, &hints, &ai);
 		if (ret) {
-			TRACE_DEBUG(INFO, "Unable to resolve address for peer '%s' (%s), aborting\n", peer->p_hdr.info.pi_diamid, gai_strerror(ret));
+			TRACE_DEBUG(INFO, "Unable to resolve address for peer '%s' (%s), aborting", peer->p_hdr.info.pi_diamid, gai_strerror(ret));
 			if (ret != EAI_AGAIN)
 				fd_psm_terminate( peer, NULL );
@@ -126,5 +126,5 @@
 	/* Now check we have at least one address to attempt */
 	if (FD_IS_LIST_EMPTY(&peer->p_hdr.info.pi_endpoints)) {
-		TRACE_DEBUG(INFO, "No address %savailable to connect to peer '%s', aborting\n", 
+		TRACE_DEBUG(INFO, "No address %savailable to connect to peer '%s', aborting", 
 					peer->p_hdr.info.config.pic_flags.pro3 ? "in the configured family " : "", peer->p_hdr.info.pi_diamid);
 		fd_psm_terminate( peer, NULL );
@@ -279,5 +279,5 @@
 			{
 				/* Handshake failed ...  */
-				TRACE_DEBUG(INFO, "TLS Handshake failed with peer '%s', resetting the connection\n", peer->p_hdr.info.pi_diamid);
+				TRACE_DEBUG(INFO, "TLS Handshake failed with peer '%s', resetting the connection", peer->p_hdr.info.pi_diamid);
 				fd_cnx_destroy(cnx);
 				empty_connection_list(peer);
Index: libfdcore/p_dp.c
===================================================================
--- libfdcore/p_dp.c	(revision 740)
+++ libfdcore/p_dp.c	(revision 974)
@@ -97,10 +97,10 @@
 				if (dictobj) {
 					CHECK_FCT( fd_dict_getval( dictobj, &er.search ) );
-					TRACE_DEBUG(INFO, "Peer '%s' sent a DPR with cause: %s\n", peer->p_hdr.info.pi_diamid, er.search.enum_name);
+					TRACE_DEBUG(INFO, "Peer '%s' sent a DPR with cause: %s", peer->p_hdr.info.pi_diamid, er.search.enum_name);
 				} else {
-					TRACE_DEBUG(INFO, "Peer '%s' sent a DPR with unknown cause: %u\n", peer->p_hdr.info.pi_diamid, peer->p_hdr.info.runtime.pir_lastDC);
+					TRACE_DEBUG(INFO, "Peer '%s' sent a DPR with unknown cause: %u", peer->p_hdr.info.pi_diamid, peer->p_hdr.info.runtime.pir_lastDC);
 				}
 			} else {
-				TRACE_DEBUG(INFO, "Peer '%s' sent a DPR without Disconnect-Cause AVP\n", peer->p_hdr.info.pi_diamid);
+				TRACE_DEBUG(INFO, "Peer '%s' sent a DPR without Disconnect-Cause AVP", peer->p_hdr.info.pi_diamid);
 			}
 		}
Index: libfdcore/p_dw.c
===================================================================
--- libfdcore/p_dw.c	(revision 745)
+++ libfdcore/p_dw.c	(revision 974)
@@ -62,5 +62,5 @@
 
 		if (peer->p_hdr.info.runtime.pir_orstate != hdr->avp_value->u32) {
-			TRACE_DEBUG(INFO, "Received a new Origin-State-Id from peer '%s'! (%x -> %x); resetting the connection.\n", 
+			TRACE_DEBUG(INFO, "Received a new Origin-State-Id from peer '%s'! (%x -> %x); resetting the connection.", 
 				peer->p_hdr.info.pi_diamid, 
 				peer->p_hdr.info.runtime.pir_orstate,
Index: libfdcore/p_psm.c
===================================================================
--- libfdcore/p_psm.c	(revision 972)
+++ libfdcore/p_psm.c	(revision 974)
@@ -486,5 +486,5 @@
 		CHECK_FCT_DO( fd_msg_parse_buffer( (void *)&ev_data, ev_sz, &msg), 
 			{
-				fd_log_debug("Received invalid data from peer '%s', closing the connection\n", peer->p_hdr.info.pi_diamid);
+				fd_log_debug("Received invalid data from peer '%s', closing the connection", peer->p_hdr.info.pi_diamid);
 				free(ev_data);
 				CHECK_FCT_DO( fd_event_send(peer->p_events, FDEVP_CNX_ERROR, 0, NULL), goto psm_reset );
Index: libfdcore/p_sr.c
===================================================================
--- libfdcore/p_sr.c	(revision 938)
+++ libfdcore/p_sr.c	(revision 974)
@@ -69,5 +69,5 @@
 		return;
 	
-	fd_log_debug("%sSentReq list @%p:\n", text, srlist);
+	fd_log_debug("%sSentReq list @%p:", text, srlist);
 	
 	CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &now), );
@@ -77,5 +77,5 @@
 		uint32_t * nexthbh = li->o;
 		
-		fd_log_debug(" - Next req (hbh:%x): [since %ld.%06ld sec]\n", *nexthbh, 
+		fd_log_debug(" - Next req (hbh:%x): [since %ld.%06ld sec]", *nexthbh, 
 			(now.tv_nsec >= sr->added_on.tv_nsec) ? (now.tv_sec - sr->added_on.tv_sec) : (now.tv_sec - sr->added_on.tv_sec - 1),
 			(now.tv_nsec >= sr->added_on.tv_nsec) ? (now.tv_nsec - sr->added_on.tv_nsec) / 1000 : (now.tv_nsec - sr->added_on.tv_nsec + 1000000000) / 1000);
Index: libfdcore/peers.c
===================================================================
--- libfdcore/peers.c	(revision 972)
+++ libfdcore/peers.c	(revision 974)
@@ -405,20 +405,21 @@
 void fd_peer_dump(struct fd_peer * peer, int details)
 {
+	char buf[1024];
 	if (peer->p_eyec != EYEC_PEER) {
-		fd_log_debug("  Invalid peer @ %p !\n", peer);
+		fd_log_debug("  Invalid peer @ %p !", peer);
 		return;
 	}
 
-	fd_log_debug(">  %s\t%s\t[%dsr]", STATE_STR(fd_peer_getstate(peer)), peer->p_hdr.info.pi_diamid, peer->p_sr.cnt);
+	snprintf(buf, sizeof(buf), ">  %s\t%s\t[%dsr]", STATE_STR(fd_peer_getstate(peer)), peer->p_hdr.info.pi_diamid, peer->p_sr.cnt);
 	if (details > INFO) {
-		fd_log_debug("\t(rlm:%s)", peer->p_hdr.info.runtime.pir_realm ?: "<unknown>");
+		snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), "\t(rlm:%s)", peer->p_hdr.info.runtime.pir_realm ?: "<unknown>");
 		if (peer->p_hdr.info.runtime.pir_prodname)
-			fd_log_debug("\t['%s' %u]", peer->p_hdr.info.runtime.pir_prodname, peer->p_hdr.info.runtime.pir_firmrev);
-	}
-	fd_log_debug("\n");
+			snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), "\t['%s' %u]", peer->p_hdr.info.runtime.pir_prodname, peer->p_hdr.info.runtime.pir_firmrev);
+	}
+	fd_log_debug(buf);
 	if (details > FULL) {
 		/* Dump all info */
-		fd_log_debug("\tEntry origin : %s\n", peer->p_dbgorig?: "not set");
-		fd_log_debug("\tConfig flags : %s%s%s%s%s - %s%s%s\n", 
+		fd_log_debug("\tEntry origin : %s", peer->p_dbgorig?: "not set");
+		fd_log_debug("\tConfig flags : %s%s%s%s%s - %s%s%s", 
 				peer->p_hdr.info.config.pic_flags.pro3 == PI_P3_DEFAULT ? "" :
 					(peer->p_hdr.info.config.pic_flags.pro3 == PI_P3_IP ? "IP." : "IPv6."),
@@ -431,5 +432,5 @@
 				peer->p_hdr.info.config.pic_flags.persist ? "Persist." : ""
 				);
-		fd_log_debug("\tLifetime : %d sec\n", peer->p_hdr.info.config.pic_lft);
+		fd_log_debug("\tLifetime : %d sec", peer->p_hdr.info.config.pic_lft);
 	}
 }
@@ -440,5 +441,5 @@
 	struct fd_list * li;
 	
-	fd_log_debug("Dumping list of peers :\n");
+	fd_log_debug("Dumping list of peers :");
 	CHECK_FCT_DO( pthread_rwlock_rdlock(&fd_g_peers_rw), /* continue */ );
 	
Index: libfdcore/routing_dispatch.c
===================================================================
--- libfdcore/routing_dispatch.c	(revision 934)
+++ libfdcore/routing_dispatch.c	(revision 974)
@@ -565,5 +565,5 @@
 		/* Check if we have local support for the message application */
 		if ( (hdr->msg_appl == 0) || (hdr->msg_appl == AI_RELAY) ) {
-			TRACE_DEBUG(INFO, "Received a routable message with application id 0 or " _stringize(AI_RELAY) " (relay),\n"
+			TRACE_DEBUG(INFO, "Received a routable message with application id 0 or " _stringize(AI_RELAY) " (relay),"
 					  " returning DIAMETER_APPLICATION_UNSUPPORTED");
 			CHECK_FCT( return_error( &msgptr, "DIAMETER_APPLICATION_UNSUPPORTED", "Routable message with application id 0 or relay", NULL) );
Index: libfdcore/sctp.c
===================================================================
--- libfdcore/sctp.c	(revision 965)
+++ libfdcore/sctp.c	(revision 974)
@@ -88,7 +88,7 @@
 				return ENOTSUP;
 			}
-			fd_log_debug( "Def SCTP_RTOINFO : srto_initial : %u\n", rtoinfo.srto_initial);
-			fd_log_debug( "                   srto_min     : %u\n", rtoinfo.srto_min);
-			fd_log_debug( "                   srto_max     : %u\n", rtoinfo.srto_max);
+			fd_log_debug( "Def SCTP_RTOINFO : srto_initial : %u", rtoinfo.srto_initial);
+			fd_log_debug( "                   srto_min     : %u", rtoinfo.srto_min);
+			fd_log_debug( "                   srto_max     : %u", rtoinfo.srto_max);
 		}
 
@@ -103,7 +103,7 @@
 			/* Check new values */
 			CHECK_SYS(  getsockopt(sk, IPPROTO_SCTP, SCTP_RTOINFO, &rtoinfo, &sz)  );
-			fd_log_debug( "New SCTP_RTOINFO : srto_initial : %u\n", rtoinfo.srto_initial);
-			fd_log_debug( "                   srto_max     : %u\n", rtoinfo.srto_max);
-			fd_log_debug( "                   srto_min     : %u\n", rtoinfo.srto_min);
+			fd_log_debug( "New SCTP_RTOINFO : srto_initial : %u", rtoinfo.srto_initial);
+			fd_log_debug( "                   srto_max     : %u", rtoinfo.srto_max);
+			fd_log_debug( "                   srto_min     : %u", rtoinfo.srto_min);
 		}
 	}
@@ -127,9 +127,9 @@
 				return ENOTSUP;
 			}
-			fd_log_debug( "Def SCTP_ASSOCINFO : sasoc_asocmaxrxt               : %hu\n", assoc.sasoc_asocmaxrxt);
-			fd_log_debug( "                     sasoc_number_peer_destinations : %hu\n", assoc.sasoc_number_peer_destinations);
-			fd_log_debug( "                     sasoc_peer_rwnd                : %u\n" , assoc.sasoc_peer_rwnd);
-			fd_log_debug( "                     sasoc_local_rwnd               : %u\n" , assoc.sasoc_local_rwnd);
-			fd_log_debug( "                     sasoc_cookie_life              : %u\n" , assoc.sasoc_cookie_life);
+			fd_log_debug( "Def SCTP_ASSOCINFO : sasoc_asocmaxrxt               : %hu", assoc.sasoc_asocmaxrxt);
+			fd_log_debug( "                     sasoc_number_peer_destinations : %hu", assoc.sasoc_number_peer_destinations);
+			fd_log_debug( "                     sasoc_peer_rwnd                : %u" , assoc.sasoc_peer_rwnd);
+			fd_log_debug( "                     sasoc_local_rwnd               : %u" , assoc.sasoc_local_rwnd);
+			fd_log_debug( "                     sasoc_cookie_life              : %u" , assoc.sasoc_cookie_life);
 		}
 
@@ -143,9 +143,9 @@
 			/* Check new values */
 			CHECK_SYS(  getsockopt(sk, IPPROTO_SCTP, SCTP_ASSOCINFO, &assoc, &sz)  );
-			fd_log_debug( "New SCTP_ASSOCINFO : sasoc_asocmaxrxt               : %hu\n", assoc.sasoc_asocmaxrxt);
-			fd_log_debug( "                     sasoc_number_peer_destinations : %hu\n", assoc.sasoc_number_peer_destinations);
-			fd_log_debug( "                     sasoc_peer_rwnd                : %u\n" , assoc.sasoc_peer_rwnd);
-			fd_log_debug( "                     sasoc_local_rwnd               : %u\n" , assoc.sasoc_local_rwnd);
-			fd_log_debug( "                     sasoc_cookie_life              : %u\n" , assoc.sasoc_cookie_life);
+			fd_log_debug( "New SCTP_ASSOCINFO : sasoc_asocmaxrxt               : %hu", assoc.sasoc_asocmaxrxt);
+			fd_log_debug( "                     sasoc_number_peer_destinations : %hu", assoc.sasoc_number_peer_destinations);
+			fd_log_debug( "                     sasoc_peer_rwnd                : %u" , assoc.sasoc_peer_rwnd);
+			fd_log_debug( "                     sasoc_local_rwnd               : %u" , assoc.sasoc_local_rwnd);
+			fd_log_debug( "                     sasoc_cookie_life              : %u" , assoc.sasoc_cookie_life);
 		}
 	}
@@ -171,8 +171,8 @@
 				return ENOTSUP;
 			}
-			fd_log_debug( "Def SCTP_INITMSG : sinit_num_ostreams   : %hu\n", init.sinit_num_ostreams);
-			fd_log_debug( "                   sinit_max_instreams  : %hu\n", init.sinit_max_instreams);
-			fd_log_debug( "                   sinit_max_attempts   : %hu\n", init.sinit_max_attempts);
-			fd_log_debug( "                   sinit_max_init_timeo : %hu\n", init.sinit_max_init_timeo);
+			fd_log_debug( "Def SCTP_INITMSG : sinit_num_ostreams   : %hu", init.sinit_num_ostreams);
+			fd_log_debug( "                   sinit_max_instreams  : %hu", init.sinit_max_instreams);
+			fd_log_debug( "                   sinit_max_attempts   : %hu", init.sinit_max_attempts);
+			fd_log_debug( "                   sinit_max_init_timeo : %hu", init.sinit_max_init_timeo);
 		}
 
@@ -187,8 +187,8 @@
 			/* Check new values */
 			CHECK_SYS(  getsockopt(sk, IPPROTO_SCTP, SCTP_INITMSG, &init, &sz)  );
-			fd_log_debug( "New SCTP_INITMSG : sinit_num_ostreams   : %hu\n", init.sinit_num_ostreams);
-			fd_log_debug( "                   sinit_max_instreams  : %hu\n", init.sinit_max_instreams);
-			fd_log_debug( "                   sinit_max_attempts   : %hu\n", init.sinit_max_attempts);
-			fd_log_debug( "                   sinit_max_init_timeo : %hu\n", init.sinit_max_init_timeo);
+			fd_log_debug( "New SCTP_INITMSG : sinit_num_ostreams   : %hu", init.sinit_num_ostreams);
+			fd_log_debug( "                   sinit_max_instreams  : %hu", init.sinit_max_instreams);
+			fd_log_debug( "                   sinit_max_attempts   : %hu", init.sinit_max_attempts);
+			fd_log_debug( "                   sinit_max_init_timeo : %hu", init.sinit_max_init_timeo);
 		}
 	}
@@ -212,6 +212,6 @@
 				return ENOTSUP;
 			}
-			fd_log_debug( "Def SO_LINGER : l_onoff  : %d\n", linger.l_onoff);
-			fd_log_debug( " 	       l_linger : %d\n", linger.l_linger);
+			fd_log_debug( "Def SO_LINGER : l_onoff  : %d", linger.l_onoff);
+			fd_log_debug( " 	       l_linger : %d", linger.l_linger);
 		}
 		
@@ -225,6 +225,6 @@
 			/* Check new values */
 			CHECK_SYS(  getsockopt(sk, SOL_SOCKET, SO_LINGER, &linger, &sz)  );
-			fd_log_debug( "New SO_LINGER : l_onoff  : %d\n", linger.l_onoff);
-			fd_log_debug( "		  l_linger : %d\n", linger.l_linger);
+			fd_log_debug( "New SO_LINGER : l_onoff  : %d", linger.l_onoff);
+			fd_log_debug( "		  l_linger : %d", linger.l_linger);
 		}
 	}
@@ -247,5 +247,5 @@
 				return ENOTSUP;
 			}
-			fd_log_debug( "Def SCTP_NODELAY value : %s\n", nodelay ? "true" : "false");
+			fd_log_debug( "Def SCTP_NODELAY value : %s", nodelay ? "true" : "false");
 		}
 
@@ -258,5 +258,5 @@
 			/* Check new values */
 			CHECK_SYS(  getsockopt(sk, IPPROTO_SCTP, SCTP_NODELAY, &nodelay, &sz)  );
-			fd_log_debug( "New SCTP_NODELAY value : %s\n", nodelay ? "true" : "false");
+			fd_log_debug( "New SCTP_NODELAY value : %s", nodelay ? "true" : "false");
 		}
 	}
@@ -287,5 +287,5 @@
 				return ENOTSUP;
 			}
-			fd_log_debug( "Def SCTP_DISABLE_FRAGMENTS value : %s\n", nofrag ? "true" : "false");
+			fd_log_debug( "Def SCTP_DISABLE_FRAGMENTS value : %s", nofrag ? "true" : "false");
 		}
 
@@ -298,5 +298,5 @@
 			/* Check new values */
 			CHECK_SYS(  getsockopt(sk, IPPROTO_SCTP, SCTP_DISABLE_FRAGMENTS, &nofrag, &sz)  );
-			fd_log_debug( "New SCTP_DISABLE_FRAGMENTS value : %s\n", nofrag ? "true" : "false");
+			fd_log_debug( "New SCTP_DISABLE_FRAGMENTS value : %s", nofrag ? "true" : "false");
 		}
 	}
@@ -324,10 +324,10 @@
 				return ENOTSUP;
 			}
-			fd_log_debug( "Def SCTP_PEER_ADDR_PARAMS : spp_hbinterval    : %u\n",  parms.spp_hbinterval);
-			fd_log_debug( "                            spp_pathmaxrxt    : %hu\n", parms.spp_pathmaxrxt);
-			fd_log_debug( "                            spp_pathmtu       : %u\n",  parms.spp_pathmtu);
-			fd_log_debug( "                            spp_flags         : %x\n",  parms.spp_flags);
-			// fd_log_debug( "                            spp_ipv6_flowlabel: %u\n",  parms.spp_ipv6_flowlabel);
-			// fd_log_debug( "                            spp_ipv4_tos      : %hhu\n",parms.spp_ipv4_tos);
+			fd_log_debug( "Def SCTP_PEER_ADDR_PARAMS : spp_hbinterval    : %u",  parms.spp_hbinterval);
+			fd_log_debug( "                            spp_pathmaxrxt    : %hu", parms.spp_pathmaxrxt);
+			fd_log_debug( "                            spp_pathmtu       : %u",  parms.spp_pathmtu);
+			fd_log_debug( "                            spp_flags         : %x",  parms.spp_flags);
+			// fd_log_debug( "                            spp_ipv6_flowlabel: %u",  parms.spp_ipv6_flowlabel);
+			// fd_log_debug( "                            spp_ipv4_tos      : %hhu",parms.spp_ipv4_tos);
 		}
 
@@ -348,10 +348,10 @@
 			/* Check new values */
 			CHECK_SYS(  getsockopt(sk, IPPROTO_SCTP, SCTP_PEER_ADDR_PARAMS, &parms, &sz)  );
-			fd_log_debug( "New SCTP_PEER_ADDR_PARAMS : spp_hbinterval    : %u\n",  parms.spp_hbinterval);
-			fd_log_debug( "                            spp_pathmaxrxt    : %hu\n", parms.spp_pathmaxrxt);
-			fd_log_debug( "                            spp_pathmtu       : %u\n",  parms.spp_pathmtu);
-			fd_log_debug( "                            spp_flags         : %x\n",  parms.spp_flags);
-			// fd_log_debug( "                            spp_ipv6_flowlabel: %u\n",  parms.spp_ipv6_flowlabel);
-			// fd_log_debug( "                            spp_ipv4_tos      : %hhu\n",parms.spp_ipv4_tos);
+			fd_log_debug( "New SCTP_PEER_ADDR_PARAMS : spp_hbinterval    : %u",  parms.spp_hbinterval);
+			fd_log_debug( "                            spp_pathmaxrxt    : %hu", parms.spp_pathmaxrxt);
+			fd_log_debug( "                            spp_pathmtu       : %u",  parms.spp_pathmtu);
+			fd_log_debug( "                            spp_flags         : %x",  parms.spp_flags);
+			// fd_log_debug( "                            spp_ipv6_flowlabel: %u",  parms.spp_ipv6_flowlabel);
+			// fd_log_debug( "                            spp_ipv4_tos      : %hhu",parms.spp_ipv4_tos);
 		}
 	}
@@ -392,13 +392,13 @@
 			}
 
-			fd_log_debug( "SCTP_EVENTS : sctp_data_io_event          : %hhu\n", event.sctp_data_io_event);
-			fd_log_debug( "       	     sctp_association_event      : %hhu\n", event.sctp_association_event);
-			fd_log_debug( "       	     sctp_address_event	         : %hhu\n", event.sctp_address_event);
-			fd_log_debug( "       	     sctp_send_failure_event     : %hhu\n", event.sctp_send_failure_event);
-			fd_log_debug( "       	     sctp_peer_error_event       : %hhu\n", event.sctp_peer_error_event);
-			fd_log_debug( "       	     sctp_shutdown_event	 : %hhu\n", event.sctp_shutdown_event);
-			fd_log_debug( "       	     sctp_partial_delivery_event : %hhu\n", event.sctp_partial_delivery_event);
-			fd_log_debug( "       	     sctp_adaptation_layer_event : %hhu\n", event.sctp_adaptation_layer_event);
-			// fd_log_debug( "             sctp_authentication_event    : %hhu\n", event.sctp_authentication_event);
+			fd_log_debug( "SCTP_EVENTS : sctp_data_io_event          : %hhu", event.sctp_data_io_event);
+			fd_log_debug( "       	     sctp_association_event      : %hhu", event.sctp_association_event);
+			fd_log_debug( "       	     sctp_address_event	         : %hhu", event.sctp_address_event);
+			fd_log_debug( "       	     sctp_send_failure_event     : %hhu", event.sctp_send_failure_event);
+			fd_log_debug( "       	     sctp_peer_error_event       : %hhu", event.sctp_peer_error_event);
+			fd_log_debug( "       	     sctp_shutdown_event	 : %hhu", event.sctp_shutdown_event);
+			fd_log_debug( "       	     sctp_partial_delivery_event : %hhu", event.sctp_partial_delivery_event);
+			fd_log_debug( "       	     sctp_adaptation_layer_event : %hhu", event.sctp_adaptation_layer_event);
+			// fd_log_debug( "             sctp_authentication_event    : %hhu", event.sctp_authentication_event);
 		}
 	}
@@ -421,5 +421,5 @@
 				return ENOTSUP;
 			}
-			fd_log_debug( "Def SCTP_I_WANT_MAPPED_V4_ADDR value : %s\n", v4mapped ? "true" : "false");
+			fd_log_debug( "Def SCTP_I_WANT_MAPPED_V4_ADDR value : %s", v4mapped ? "true" : "false");
 		}
 
@@ -436,5 +436,5 @@
 			/* Check new values */
 			CHECK_SYS(  getsockopt(sk, IPPROTO_SCTP, SCTP_I_WANT_MAPPED_V4_ADDR, &v4mapped, &sz)  );
-			fd_log_debug( "New SCTP_I_WANT_MAPPED_V4_ADDR value : %s\n", v4mapped ? "true" : "false");
+			fd_log_debug( "New SCTP_I_WANT_MAPPED_V4_ADDR value : %s", v4mapped ? "true" : "false");
 		}
 	} else {
@@ -467,5 +467,5 @@
 				return ENOTSUP;
 			}
-			fd_log_debug( "Def SCTP_FRAGMENT_INTERLEAVE value : %d\n", interleave);
+			fd_log_debug( "Def SCTP_FRAGMENT_INTERLEAVE value : %d", interleave);
 		}
 
@@ -482,5 +482,5 @@
 			/* Check new values */
 			CHECK_SYS(  getsockopt(sk, IPPROTO_SCTP, SCTP_FRAGMENT_INTERLEAVE, &interleave, &sz)  );
-			fd_log_debug( "New SCTP_FRAGMENT_INTERLEAVE value : %d\n", interleave);
+			fd_log_debug( "New SCTP_FRAGMENT_INTERLEAVE value : %d", interleave);
 		}
 	}
@@ -513,5 +513,5 @@
 				return ENOTSUP;
 			}
-			fd_log_debug( "Def SCTP_EXPLICIT_EOR value : %s\n", bool ? "true" : "false");
+			fd_log_debug( "Def SCTP_EXPLICIT_EOR value : %s", bool ? "true" : "false");
 		}
 
@@ -524,5 +524,5 @@
 			/* Check new values */
 			CHECK_SYS(  getsockopt(sk, IPPROTO_SCTP, SCTP_EXPLICIT_EOR, &bool, &sz)  );
-			fd_log_debug( "New SCTP_EXPLICIT_EOR value : %s\n", bool ? "true" : "false");
+			fd_log_debug( "New SCTP_EXPLICIT_EOR value : %s", bool ? "true" : "false");
 		}
 	}
@@ -571,5 +571,5 @@
 				return ENOTSUP;
 			}
-			fd_log_debug( "Def SCTP_AUTO_ASCONF value : %s\n", asconf ? "true" : "false");
+			fd_log_debug( "Def SCTP_AUTO_ASCONF value : %s", asconf ? "true" : "false");
 		}
 
@@ -583,5 +583,5 @@
 			/* Check new values */
 			CHECK_SYS(  getsockopt(sk, IPPROTO_SCTP, SCTP_AUTO_ASCONF, &asconf, &sz)  );
-			fd_log_debug( "New SCTP_AUTO_ASCONF value : %s\n", asconf ? "true" : "false");
+			fd_log_debug( "New SCTP_AUTO_ASCONF value : %s", asconf ? "true" : "false");
 		}
 	}
@@ -746,5 +746,5 @@
 			int i;
 			ptr.sa = sar;
-			fd_log_debug("Calling sctp_bindx with the following address array:\n");
+			fd_log_debug("Calling sctp_bindx with the following address array:");
 			for (i = 0; i < count; i++) {
 				TRACE_sSA(FD_LOG_DEBUG, FULL, "    - ", ptr.sa, NI_NUMERICHOST | NI_NUMERICSERV, "" );
@@ -774,5 +774,5 @@
 		CHECK_SYS(  sz = sctp_getladdrs(*sock, 0, &sar)  );
 		
-		fd_log_debug("SCTP server bound on :\n");
+		fd_log_debug("SCTP server bound on :");
 		for (ptr.sa = sar; sz-- > 0; ptr.buf += (ptr.sa->sa_family == AF_INET) ? sizeof(sSA4) : sizeof(sSA6)) {
 			TRACE_sSA(FD_LOG_DEBUG, FULL, "    - ", ptr.sa, NI_NUMERICHOST | NI_NUMERICSERV, "" );
@@ -911,17 +911,17 @@
 		char buf[1024];
 		sSA_DUMP_NODE_SERV(buf, sizeof(buf), &status.sstat_primary.spinfo_address, NI_NUMERICHOST | NI_NUMERICSERV );
-		fd_log_debug( "SCTP_STATUS : sstat_state                  : %i\n" , status.sstat_state);
-		fd_log_debug( "              sstat_rwnd  	          : %u\n" , status.sstat_rwnd);
-		fd_log_debug( "		     sstat_unackdata	          : %hu\n", status.sstat_unackdata);
-		fd_log_debug( "		     sstat_penddata 	          : %hu\n", status.sstat_penddata);
-		fd_log_debug( "		     sstat_instrms  	          : %hu\n", status.sstat_instrms);
-		fd_log_debug( "		     sstat_outstrms 	          : %hu\n", status.sstat_outstrms);
-		fd_log_debug( "		     sstat_fragmentation_point    : %u\n" , status.sstat_fragmentation_point);
-		fd_log_debug( "		     sstat_primary.spinfo_address : %s\n" , buf);
-		fd_log_debug( "		     sstat_primary.spinfo_state   : %d\n" , status.sstat_primary.spinfo_state);
-		fd_log_debug( "		     sstat_primary.spinfo_cwnd    : %u\n" , status.sstat_primary.spinfo_cwnd);
-		fd_log_debug( "		     sstat_primary.spinfo_srtt    : %u\n" , status.sstat_primary.spinfo_srtt);
-		fd_log_debug( "		     sstat_primary.spinfo_rto     : %u\n" , status.sstat_primary.spinfo_rto);
-		fd_log_debug( "		     sstat_primary.spinfo_mtu     : %u\n" , status.sstat_primary.spinfo_mtu);
+		fd_log_debug( "SCTP_STATUS : sstat_state                  : %i" , status.sstat_state);
+		fd_log_debug( "              sstat_rwnd  	          : %u" , status.sstat_rwnd);
+		fd_log_debug( "		     sstat_unackdata	          : %hu", status.sstat_unackdata);
+		fd_log_debug( "		     sstat_penddata 	          : %hu", status.sstat_penddata);
+		fd_log_debug( "		     sstat_instrms  	          : %hu", status.sstat_instrms);
+		fd_log_debug( "		     sstat_outstrms 	          : %hu", status.sstat_outstrms);
+		fd_log_debug( "		     sstat_fragmentation_point    : %u" , status.sstat_fragmentation_point);
+		fd_log_debug( "		     sstat_primary.spinfo_address : %s" , buf);
+		fd_log_debug( "		     sstat_primary.spinfo_state   : %d" , status.sstat_primary.spinfo_state);
+		fd_log_debug( "		     sstat_primary.spinfo_cwnd    : %u" , status.sstat_primary.spinfo_cwnd);
+		fd_log_debug( "		     sstat_primary.spinfo_srtt    : %u" , status.sstat_primary.spinfo_srtt);
+		fd_log_debug( "		     sstat_primary.spinfo_rto     : %u" , status.sstat_primary.spinfo_rto);
+		fd_log_debug( "		     sstat_primary.spinfo_mtu     : %u" , status.sstat_primary.spinfo_mtu);
 	}
 	
@@ -1219,14 +1219,14 @@
 			sndrcv = (struct sctp_sndrcvinfo *) CMSG_DATA(hdr);
 			if (TRACE_BOOL(SCTP_LEVEL)) {
-				fd_log_debug( "Anciliary block IPPROTO_SCTP / SCTP_SNDRCV\n");
-				fd_log_debug( "    sinfo_stream    : %hu\n", sndrcv->sinfo_stream);
-				fd_log_debug( "    sinfo_ssn       : %hu\n", sndrcv->sinfo_ssn);
-				fd_log_debug( "    sinfo_flags     : %hu\n", sndrcv->sinfo_flags);
-				/* fd_log_debug( "    sinfo_pr_policy : %hu\n", sndrcv->sinfo_pr_policy); */
-				fd_log_debug( "    sinfo_ppid      : %u\n" , sndrcv->sinfo_ppid);
-				fd_log_debug( "    sinfo_context   : %u\n" , sndrcv->sinfo_context);
-				/* fd_log_debug( "    sinfo_pr_value  : %u\n" , sndrcv->sinfo_pr_value); */
-				fd_log_debug( "    sinfo_tsn       : %u\n" , sndrcv->sinfo_tsn);
-				fd_log_debug( "    sinfo_cumtsn    : %u\n" , sndrcv->sinfo_cumtsn);
+				fd_log_debug( "Anciliary block IPPROTO_SCTP / SCTP_SNDRCV");
+				fd_log_debug( "    sinfo_stream    : %hu", sndrcv->sinfo_stream);
+				fd_log_debug( "    sinfo_ssn       : %hu", sndrcv->sinfo_ssn);
+				fd_log_debug( "    sinfo_flags     : %hu", sndrcv->sinfo_flags);
+				/* fd_log_debug( "    sinfo_pr_policy : %hu", sndrcv->sinfo_pr_policy); */
+				fd_log_debug( "    sinfo_ppid      : %u" , sndrcv->sinfo_ppid);
+				fd_log_debug( "    sinfo_context   : %u" , sndrcv->sinfo_context);
+				/* fd_log_debug( "    sinfo_pr_value  : %u" , sndrcv->sinfo_pr_value); */
+				fd_log_debug( "    sinfo_tsn       : %u" , sndrcv->sinfo_tsn);
+				fd_log_debug( "    sinfo_cumtsn    : %u" , sndrcv->sinfo_cumtsn);
 			}
 
Index: libfdcore/sctps.c
===================================================================
--- libfdcore/sctps.c	(revision 965)
+++ libfdcore/sctps.c	(revision 974)
@@ -486,7 +486,7 @@
 	if (TRACE_BOOL(FULL)) {
 		if (resumed) {
-			fd_log_debug("Session was resumed successfully on stream %hu (conn: '%s')\n", ctx->strid, fd_cnx_getid(ctx->parent));
+			fd_log_debug("Session was resumed successfully on stream %hu (conn: '%s')", ctx->strid, fd_cnx_getid(ctx->parent));
 		} else {
-			fd_log_debug("Session was NOT resumed on stream %hu  (full handshake) (conn: '%s')\n", ctx->strid, fd_cnx_getid(ctx->parent));
+			fd_log_debug("Session was NOT resumed on stream %hu  (full handshake) (conn: '%s')", ctx->strid, fd_cnx_getid(ctx->parent));
 		}
 	}
Index: libfdcore/server.c
===================================================================
--- libfdcore/server.c	(revision 931)
+++ libfdcore/server.c	(revision 974)
@@ -98,9 +98,9 @@
 	struct fd_list * li, *cli;
 	
-	fd_log_debug("Dumping servers list :\n");
+	fd_log_debug("Dumping servers list :");
 	for (li = FD_SERVERS.next; li != &FD_SERVERS; li = li->next) {
 		struct server * s = (struct server *)li;
 		enum s_state st = get_status(s);
-		fd_log_debug("  Serv %p '%s': %s, %s, %s\n", 
+		fd_log_debug("  Serv %p '%s': %s, %s, %s", 
 				s, fd_cnx_getid(s->conn), 
 				IPPROTO_NAME( s->proto ),
@@ -115,5 +115,5 @@
 			struct client * c = (struct client *)cli;
 			char bufts[128];
-			fd_log_debug("     Connected: '%s' (timeout: %s)\n",
+			fd_log_debug("     Connected: '%s' (timeout: %s)",
 					fd_cnx_getid(c->conn),
 					fd_log_time(&c->ts, bufts, sizeof(bufts)));
@@ -148,5 +148,5 @@
 		if (ret != 0) {
 			if (TRACE_BOOL(INFO)) {
-				fd_log_debug("TLS handshake failed for client '%s', connection aborted.\n", fd_cnx_getid(c->conn));
+				fd_log_debug("TLS handshake failed for client '%s', connection aborted.", fd_cnx_getid(c->conn));
 			}
 			goto cleanup;
@@ -177,5 +177,5 @@
 	CHECK_FCT_DO( fd_msg_hdr ( msg, &hdr ), goto fatal_error );
 	CHECK_PARAMS_DO( (hdr->msg_appl == 0) && (hdr->msg_flags & CMD_FLAG_REQUEST) && (hdr->msg_code == CC_CAPABILITIES_EXCHANGE),
-		{ fd_log_debug("Connection '%s', expecting CER, received something else, closing...\n", fd_cnx_getid(c->conn)); goto cleanup; } );
+		{ fd_log_debug("Connection '%s', expecting CER, received something else, closing...", fd_cnx_getid(c->conn)); goto cleanup; } );
 	
 	/* Finally, pass the information to the peers module which will handle it next */
@@ -387,5 +387,5 @@
 		CHECK_FCT(fd_cnx_get_local_eps(&fd_g_config->cnf_endpoints));
 		if (FD_IS_LIST_EMPTY(&fd_g_config->cnf_endpoints)) {
-			TRACE_DEBUG(INFO, "Unable to find the address(es) of the local system.\n" 
+			TRACE_DEBUG(INFO, "Unable to find the address(es) of the local system." 
 					"Please use \"ListenOn\" parameter in the configuration.\n"
 					"This information is required to generate the CER/CEA messages.\n");
@@ -394,5 +394,5 @@
 	}
 	if (TRACE_BOOL(FULL)){
-		fd_log_debug("  Local server address(es) :\n");
+		fd_log_debug("  Local server address(es) :");
 		fd_ep_dump( 5, &fd_g_config->cnf_endpoints );
 	}
