changeset 974:2091bf698fb1

Remove newlines from fd_log_debug, TRACE_DEBUG, TRACE_ERROR, and TRACE_DEBUG_ERROR (as far as sed could find them) with manual fixing afterwards.
author Thomas Klausner <tk@giga.or.at>
date Thu, 14 Mar 2013 18:14:35 +0100
parents 60949d03d17a
children 5c564966a754
files extensions/_sample/sample.c extensions/acl_wl/aw_conf.l extensions/acl_wl/aw_conf.y extensions/acl_wl/aw_tree.c extensions/app_acct/acct_conf.l extensions/app_acct/acct_conf.y extensions/app_acct/acct_db.c extensions/app_acct/acct_records.c extensions/app_diameap/diameap.l extensions/app_diameap/diameap.y extensions/app_diameap/diameap_eap.c extensions/app_diameap/diameap_eap.h extensions/app_diameap/diameap_eappacket.c extensions/app_diameap/diameap_init.c extensions/app_diameap/diameap_plugins.c extensions/app_diameap/plugins.h extensions/app_diameap/plugins/eap_identity/eap_identity.c extensions/app_diameap/plugins/eap_tls/eaptls.l extensions/app_diameap/plugins/eap_tls/eaptls.y extensions/app_radgw/radius.c extensions/app_radgw/rgw_clients.c extensions/app_radgw/rgw_conf.l extensions/app_radgw/rgw_conf.y extensions/app_radgw/rgw_plugins.c extensions/app_radgw/rgw_servers.c extensions/app_radgw/rgw_worker.c extensions/app_radgw/rgwx_acct.c extensions/app_radgw/rgwx_auth.c extensions/app_radgw/rgwx_debug.c extensions/app_radgw/rgwx_echodrop.c extensions/app_radgw/rgwx_echodrop.l extensions/app_radgw/rgwx_echodrop.y extensions/app_radgw/rgwx_sip.c extensions/app_redirect/ard_conf.l extensions/app_redirect/ard_conf.y extensions/app_redirect/ard_rules.c extensions/app_sip/app_sip.l extensions/app_sip/app_sip.y extensions/dbg_interactive/dbg_interactive.c extensions/dbg_monitor/dbg_monitor.c extensions/dbg_rt/dbg_rt.c extensions/dict_dcca/dict_dcca.c extensions/dict_legacy_xml/dict_lxml.l extensions/dict_legacy_xml/dict_lxml.y extensions/dict_legacy_xml/dict_lxml_xml.c extensions/rt_default/rtd_conf.l extensions/rt_default/rtd_conf.y extensions/rt_default/rtd_rules.c extensions/rt_ereg/rtereg_conf.l extensions/rt_ereg/rtereg_conf.y extensions/test_acct/test_acct.c extensions/test_app/ta_bench.c extensions/test_app/ta_conf.l extensions/test_app/ta_conf.y extensions/test_app/ta_serv.c extensions/test_app/test_app.c extensions/test_netemul/test_netemul.l extensions/test_netemul/test_netemul.y extensions/test_sip/test_sip.l extensions/test_sip/test_sip.y libfdcore/cnxctx.c libfdcore/config.c libfdcore/core.c libfdcore/endpoints.c libfdcore/events.c libfdcore/extensions.c libfdcore/fdd.l libfdcore/fdd.y libfdcore/p_ce.c libfdcore/p_cnx.c libfdcore/p_dp.c libfdcore/p_dw.c libfdcore/p_psm.c libfdcore/p_sr.c libfdcore/peers.c libfdcore/routing_dispatch.c libfdcore/sctp.c libfdcore/sctps.c libfdcore/server.c libfdproto/dictionary.c libfdproto/fifo.c libfdproto/init.c libfdproto/log.c libfdproto/messages.c libfdproto/msg_log.c libfdproto/sessions.c tests/testcnx.c tests/testmesg.c
diffstat 80 files changed, 666 insertions(+), 662 deletions(-) [+]
line wrap: on
line diff
--- a/extensions/_sample/sample.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/_sample/sample.c	Thu Mar 14 18:14:35 2013 +0100
@@ -86,7 +86,7 @@
 		
 		fd_dict_dump_object(example_avp_avp);
 	}
-	TRACE_DEBUG(INFO, "'Example-AVP' created without error\n");
+	TRACE_DEBUG(INFO, "'Example-AVP' created without error");
 	
 	/* Call the c++ function */
 	mycppfunc();
--- a/extensions/acl_wl/aw_conf.l	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/acl_wl/aw_conf.l	Thu Mar 14 18:14:35 2013 +0100
@@ -95,7 +95,7 @@
 	/* No match */
 <*>[[:alnum:]]+		|	/* This rule is only useful to print a complete token in error messages */
 <*>.			{
-				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; 
 			}
 
--- a/extensions/acl_wl/aw_conf.y	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/acl_wl/aw_conf.y	Thu Mar 14 18:14:35 2013 +0100
@@ -73,7 +73,7 @@
 	aw_confin = fopen(conffile, "r");
 	if (aw_confin == NULL) {
 		ret = errno;
-		fd_log_debug("Unable to open extension configuration file %s for reading: %s\n", conffile, strerror(ret));
+		fd_log_debug("Unable to open extension configuration file %s for reading: %s", conffile, strerror(ret));
 		TRACE_DEBUG (INFO, "Error occurred, message logged -- configuration file.");
 		return ret;
 	}
@@ -101,11 +101,11 @@
 	TRACE_DEBUG(INFO, "Error in configuration parsing");
 	
 	if (ploc->first_line != ploc->last_line)
-		fd_log_debug("%s:%d.%d-%d.%d : %s\n", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);
+		fd_log_debug("%s:%d.%d-%d.%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);
 	else if (ploc->first_column != ploc->last_column)
-		fd_log_debug("%s:%d.%d-%d : %s\n", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s);
+		fd_log_debug("%s:%d.%d-%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s);
 	else
-		fd_log_debug("%s:%d.%d : %s\n", conffile, ploc->first_line, ploc->first_column, s);
+		fd_log_debug("%s:%d.%d : %s", conffile, ploc->first_line, ploc->first_column, s);
 }
 
 %}
--- a/extensions/acl_wl/aw_tree.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/acl_wl/aw_tree.c	Thu Mar 14 18:14:35 2013 +0100
@@ -115,9 +115,9 @@
 	result->last_lbl = l;
 	
 #if 0
-	fd_log_debug("Parsed name %s as:\n", name);
+	fd_log_debug("Parsed name %s as:", name);
 	for (i=0; i<=l; i++)
-		fd_log_debug("  str[%d] len: %d, v:%.*s\n", i, result->label[i].len, result->label[i].len, result->label[i].str);
+		fd_log_debug("  str[%d] len: %d, v:%.*s", i, result->label[i].len, result->label[i].len, result->label[i].str);
 #endif /* 0 */
 	return 0;
 }
@@ -178,10 +178,11 @@
 	struct fd_list * li;
 	for (li = sub->next; li != sub; li = li->next) {
 		struct tree_item * ti = (struct tree_item *)li;
-		fd_log_debug("%*s%s", indent * 2, "", ti->str?:"*");
+		char buf[1024];
+		snprintf(buf, sizeof(buf), "%*s%s", indent * 2, "", ti->str?:"*");
 		if (ti->leaf)
-			fd_log_debug(" (flag:%x)", ti->flags);
-		fd_log_debug("\n");
+			snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), " (flag:%x)", ti->flags);
+		fd_log_debug("%s", buf);
 		tree_dump(&ti->children, indent + 1);
 	}
 }
@@ -189,9 +190,10 @@
 /* Top-level function */
 void aw_tree_dump(void)
 {
-	fd_log_debug("[acl_wl] tree dump:\n(root)\n");
+	fd_log_debug("[acl_wl] tree dump:");
+	fd_log_debug("(root)");
 	tree_dump(&tree_root, 1);
-	fd_log_debug("[acl_wl] end of dump\n");
+	fd_log_debug("[acl_wl] end of dump");
 }
 
 /* Function to add a new entry in the tree */
@@ -207,7 +209,7 @@
 	
 	CHECK_FCT_DO( parse_name(name, &sn), 
 		{ 
-			fd_log_debug("The name '%s' contains too many labels, try a generic (*) or recompile with bigger AW_TREE_MAXDEPTH value (cur: %d)\n", name, AW_TREE_MAXDEPTH); 
+			fd_log_debug("The name '%s' contains too many labels, try a generic (*) or recompile with bigger AW_TREE_MAXDEPTH value (cur: %d)", name, AW_TREE_MAXDEPTH); 
 			return EINVAL; 
 		} );
 		
@@ -228,7 +230,7 @@
 		/* Check if we have a '*' element already that overlapses */
 		ti = (struct tree_item *)(senti->next);
 		if (ti->str == NULL) {
-			fd_log_debug("[acl_wl] Warning: entry '%s' is superseeded by a generic entry at label %d, ignoring.\n", name, lbl + 1);
+			fd_log_debug("[acl_wl] Warning: entry '%s' is superseeded by a generic entry at label %d, ignoring.", name, lbl + 1);
 			return 0;
 		}
 		
@@ -274,7 +276,7 @@
 	/* At this point, senti points to the list where we are supposed to insert our last label. */
 	if (sn.label[0].str[0] == '*') {
 		if (!FD_IS_LIST_EMPTY(senti)) {
-			fd_log_debug("[acl_wl] Warning: entry '%s' overwrites previous more detailed entries, these are deleted.\n", name);
+			fd_log_debug("[acl_wl] Warning: entry '%s' overwrites previous more detailed entries, these are deleted.", name);
 			delete_tree(senti);
 		}
 		
@@ -285,7 +287,7 @@
 			/* Check we don't have a '*' entry already */
 			ti = (struct tree_item *)(senti->next);
 			if (ti->str == NULL) {
-				fd_log_debug("[acl_wl] Warning: entry '%s' is superseeded by a generic entry at label 1, ignoring.\n", name);
+				fd_log_debug("[acl_wl] Warning: entry '%s' is superseeded by a generic entry at label 1, ignoring.", name);
 				return 0;
 			}
 			
@@ -309,7 +311,7 @@
 
 				/* We already had this label */
 				if (ti->leaf) {
-					fd_log_debug("[acl_wl] Warning: entry '%s' is duplicated, merging the flags.\n", name);
+					fd_log_debug("[acl_wl] Warning: entry '%s' is duplicated, merging the flags.", name);
 					ti->flags |= flags;
 					return 0;
 				} else {
--- a/extensions/app_acct/acct_conf.l	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/app_acct/acct_conf.l	Thu Mar 14 18:14:35 2013 +0100
@@ -80,7 +80,7 @@
 				ret = sscanf(yytext, "%i", &yylval->integer);
 				if (ret != 1) {
 					/* No matching: an error occurred */
-					fd_log_debug("Unable to convert the value '%s' to a valid number: %s\n", yytext, strerror(errno));
+					fd_log_debug("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? */
 				}
@@ -92,7 +92,7 @@
 				/* Match a quoted string. Let's be very permissive. */
 				yylval->string = strdup(yytext+1);
 				if (!yylval->string) {
-					fd_log_debug("Unable to copy the string '%s': %s\n", yytext, strerror(errno));
+					fd_log_debug("Unable to copy the string '%s': %s", yytext, strerror(errno));
 					TRACE_DEBUG(INFO, "strdup failed");
 					return LEX_ERROR; /* trig an error in yacc parser */
 				}
@@ -136,7 +136,7 @@
 
 	/* Unrecognized sequence, if it did not match any previous pattern */
 [^[:space:]"*=>;\n]+	{ 
-				fd_log_debug("Unrecognized text on line %d col %d: '%s'.\n", yylloc->first_line, yylloc->first_column, yytext);
+				fd_log_debug("Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext);
 			 	return LEX_ERROR; 
 			}
 
--- a/extensions/app_acct/acct_conf.y	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/app_acct/acct_conf.y	Thu Mar 14 18:14:35 2013 +0100
@@ -82,12 +82,12 @@
 	CHECK_PARAMS(acct_config);
 	
 	if ( ! acct_config->conninfo) {
-		fd_log_debug("[app_acct] ERROR: 'ConnInfo' is missing in file '%s'.\n"
+		fd_log_debug("[app_acct] ERROR: 'ConnInfo' is missing in file '%s'."
 			" You can specify 'ConnInfo=\"\";' to use default parameters.\n", conffile);
 		return EINVAL;
 	}
 	if ( ! acct_config->tablename) {
-		fd_log_debug("[app_acct] ERROR: 'Table' value is missing in file '%s'.\n", conffile);
+		fd_log_debug("[app_acct] ERROR: 'Table' value is missing in file '%s'.", conffile);
 		return EINVAL;
 	}
 
@@ -96,13 +96,13 @@
 	
 	struct fd_list * li;
 		
-	fd_log_debug("[app_acct] Configuration dump:\n");
-	fd_log_debug(" Database:\n");
-	fd_log_debug("   ConnInfo ...... : '%s'\n", acct_config->conninfo ?: "<null>");
-	fd_log_debug("   Table name .... : '%s'\n", acct_config->tablename ?: "<null>");
-	fd_log_debug("   Timestamp field : '%s'\n", acct_config->tsfield ?: "<null>");
-	fd_log_debug("   Server name fld : '%s'\n", acct_config->srvnfield ?: "<null>");
-	fd_log_debug(" AVPs that will be saved to the database:\n");
+	fd_log_debug("[app_acct] Configuration dump:");
+	fd_log_debug(" Database:");
+	fd_log_debug("   ConnInfo ...... : '%s'", acct_config->conninfo ?: "<null>");
+	fd_log_debug("   Table name .... : '%s'", acct_config->tablename ?: "<null>");
+	fd_log_debug("   Timestamp field : '%s'", acct_config->tsfield ?: "<null>");
+	fd_log_debug("   Server name fld : '%s'", acct_config->srvnfield ?: "<null>");
+	fd_log_debug(" AVPs that will be saved to the database:");
 	for (li = acct_config->avps.next; li != &acct_config->avps; li = li->next) {
 		struct acct_conf_avp * a = (struct acct_conf_avp *)li;
 		fd_log_debug("   %-*s AVP%s saved in ", 30, a->avpname, a->required ? " [required]":"" );
@@ -111,9 +111,9 @@
 		} else {
 			fd_log_debug("field '%s' ", a->field?:a->avpname);
 		}
-		fd_log_debug("as ::%s\n", diam2db_types_mapping[a->avptype]);
+		fd_log_debug("as ::%s", diam2db_types_mapping[a->avptype]);
 	}
-	fd_log_debug("[app_acct] Complete.\n");
+	fd_log_debug("[app_acct] Complete.");
 	return 0;
 }
 
@@ -157,7 +157,7 @@
 	acct_confin = fopen(conffile, "r");
 	if (acct_confin == NULL) {
 		ret = errno;
-		fd_log_debug("Unable to open extension configuration file %s for reading: %s\n", conffile, strerror(ret));
+		fd_log_debug("Unable to open extension configuration file %s for reading: %s", conffile, strerror(ret));
 		return ret;
 	}
 
@@ -179,11 +179,11 @@
 	TRACE_DEBUG(INFO, "Error in configuration parsing");
 	
 	if (ploc->first_line != ploc->last_line)
-		fd_log_debug("%s:%d.%d-%d.%d : %s\n", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);
+		fd_log_debug("%s:%d.%d-%d.%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);
 	else if (ploc->first_column != ploc->last_column)
-		fd_log_debug("%s:%d.%d-%d : %s\n", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s);
+		fd_log_debug("%s:%d.%d-%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s);
 	else
-		fd_log_debug("%s:%d.%d : %s\n", conffile, ploc->first_line, ploc->first_column, s);
+		fd_log_debug("%s:%d.%d : %s", conffile, ploc->first_line, ploc->first_column, s);
 }
 
 static struct acct_conf_avp avpdata;
--- a/extensions/app_acct/acct_db.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/app_acct/acct_db.c	Thu Mar 14 18:14:35 2013 +0100
@@ -78,7 +78,7 @@
 	CHECK_PARAMS( acct_config && acct_config->conninfo && acct_config->tablename ); 
 	
 	CHECK_PARAMS_DO( PQisthreadsafe() == 1, {
-		fd_log_debug("You PostGreSQL installation is not thread-safe!\n");
+		fd_log_debug("You PostGreSQL installation is not thread-safe!");
 		return EINVAL;
 	} );			
 	
@@ -87,12 +87,12 @@
 	
 	/* Check to see that the backend connection was successfully made */
 	if (PQstatus(conn) != CONNECTION_OK) {
-		fd_log_debug("Connection to database failed: %s\n", PQerrorMessage(conn));
+		fd_log_debug("Connection to database failed: %s", PQerrorMessage(conn));
 		acct_db_free();
 		return EINVAL;
 	}
 	if (PQprotocolVersion(conn) < 3) {
-		fd_log_debug("Database protocol version is too old, version 3 is required for prepared statements.\n");
+		fd_log_debug("Database protocol version is too old, version 3 is required for prepared statements.");
 		acct_db_free();
 		return EINVAL;
 	}
@@ -193,7 +193,7 @@
 	
 	ADD_EXTEND(");");
 	
-	TRACE_DEBUG(FULL, "Preparing the following SQL statement:\n%s\n", sql);
+	TRACE_DEBUG(FULL, "Preparing the following SQL statement: '%s'", sql);
 	res = PQprepare(conn, stmt, sql, emptyrecords.nball, NULL);
 	if (PQresultStatus(res) != PGRES_COMMAND_OK) {
 		TRACE_DEBUG(INFO, "Preparing statement '%s' failed: %s",
--- a/extensions/app_acct/acct_records.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/app_acct/acct_records.c	Thu Mar 14 18:14:35 2013 +0100
@@ -125,7 +125,7 @@
 	
 	/* Check at least one AVP was mapped */
 	if (records->nball == records->nbunmap) {
-		fd_log_debug("The received ACR does not contain any AVP from the configuration file.\n"
+		fd_log_debug("The received ACR does not contain any AVP from the configuration file."
 				"This is an invalid situation. Please fix your configuration file.\n"
 				"One way to ensure this does not happen is to include Session-Id in the database.\n");
 		acct_rec_empty(records);
@@ -136,7 +136,7 @@
 	for (li = records->unmaped.next; li != &records->unmaped; li = li->next) {
 		struct acct_record_item * r = (struct acct_record_item *)(li->o);
 		if (r->param->required && (r->index <= 1)) {
-			fd_log_debug("The received ACR does not contain the required AVP '%s'.\n", r->param->avpname);
+			fd_log_debug("The received ACR does not contain the required AVP '%s'.", r->param->avpname);
 			acct_rec_empty(records);
 			return EINVAL;
 		}
--- a/extensions/app_diameap/diameap.y	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/app_diameap/diameap.y	Thu Mar 14 18:14:35 2013 +0100
@@ -123,7 +123,7 @@
 		}
 		if (fl == NULL) {
 			int ret = errno;
-			TRACE_DEBUG(INFO, "Unable to open %s plugin file %s for reading: %s\n", $3, infile, strerror(ret));
+			TRACE_DEBUG(INFO, "Unable to open %s plugin file %s for reading: %s", $3, infile, strerror(ret));
 			yyerror (&yylloc, config, "Error adding EAP Plugin"); 
 			YYERROR;
 		}
--- a/extensions/app_diameap/diameap_eappacket.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/app_diameap/diameap_eappacket.c	Thu Mar 14 18:14:35 2013 +0100
@@ -185,7 +185,7 @@
 	if (eappacket.ulength < 5)
 		return;
 
-	fd_log_debug("------------- Dump EAP Packet-------------\n");
+	fd_log_debug("------------- Dump EAP Packet-------------");
 	int i;
 	fd_log_debug("\t -Code       : ");
 	eap_code code;
@@ -193,45 +193,46 @@
 	switch (code)
 	{
 	case 1:
-		fd_log_debug("Request\n");
+		fd_log_debug("Request");
 		break;
 	case 2:
-		fd_log_debug("Response\n");
+		fd_log_debug("Response");
 		break;
 	case 3:
-		fd_log_debug("Success\n");
+		fd_log_debug("Success");
 		break;
 	case 4:
-		fd_log_debug("Failure\n");
+		fd_log_debug("Failure");
 		break;
 	default:
-		fd_log_debug("Error (EAP Code value [%d] not allowed)\n",code);
+		fd_log_debug("Error (EAP Code value [%d] not allowed)",code);
 		break;
 	}
 	u8 id;
 	CHECK_FCT_DO(diameap_eap_get_identifier(eappacket,&id),return);
-	fd_log_debug("\t -Identifier : %x \n", id);
+	fd_log_debug("\t -Identifier : %x ", id);
 	u16 length;
 	CHECK_FCT_DO(diameap_eap_get_length(eappacket,&length),return);
-	fd_log_debug("\t -Length     : %d \n", (unsigned int)length);
+	fd_log_debug("\t -Length     : %d ", (unsigned int)length);
 	if (eappacket.length > 4)
 	{
 		eap_type type;
 		CHECK_FCT_DO(diameap_eap_get_type(eappacket,&type),return);
-		fd_log_debug("\t -Type       : %d \n", type);
+		fd_log_debug("\t -Type       : %d ", type);
 	}
 	if (eappacket.length > 5)
 	{
-		fd_log_debug("\t -Data       : ");
+		char buf[1024];
+		snprintf(buf, sizeof(buf), "\t -Data       : ");
 		for (i = 5; i < eappacket.length && i < 30; i++)
 		{
-			fd_log_debug("%02x ", G8(eappacket.data + i));
+			snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), "%02x ", G8(eappacket.data + i));
 		}
 		if(i+1<eappacket.length)
-			fd_log_debug("[...] (len=%d)",(unsigned int) length);
-		fd_log_debug("\n");
+			snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), "[...] (len=%d)",(unsigned int) length);
+		fd_log_debug("%s", buf);
 	}
-	fd_log_debug("-------------End Dump EAP Packet-------------\n");
+	fd_log_debug("-------------End Dump EAP Packet-------------");
 }
 
 int diameap_eap_new(eap_code code, u8 id, eap_type type, u8 * data,
--- a/extensions/app_diameap/diameap_init.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/app_diameap/diameap_init.c	Thu Mar 14 18:14:35 2013 +0100
@@ -367,29 +367,27 @@
 	if (!TRACE_BOOL(INFO))
 		return;
 
-	fd_log_debug(
-			"-------- DiamEAP extension : Configuration parameters (Dump) -------------\n");
-	fd_log_debug("\t-Configuration file.....: %s\n", diameap_config->conffile);
-	fd_log_debug("\t-EAP Application Id.....: %u\n",
+	fd_log_debug("-------- DiamEAP extension : Configuration parameters (Dump) -------------");
+	fd_log_debug("\t-Configuration file.....: %s", diameap_config->conffile);
+	fd_log_debug("\t-EAP Application Id.....: %u",
 			diameap_config->application_id);
-	fd_log_debug("\t-EAP Application Command: %u\n",
+	fd_log_debug("\t-EAP Application Command: %u",
 			diameap_config->command_code);
-	fd_log_debug("\t-EAP Application Vendor.: %u\n", diameap_config->vendor_id);
-	fd_log_debug("\t-Max invalid EAP packets: %u\n", diameap_config->max_invalid_eap_packet);
-	fd_log_debug("\t-Multi-Round Timeout....: %u\n", diameap_config->multi_round_time_out);
+	fd_log_debug("\t-EAP Application Vendor.: %u", diameap_config->vendor_id);
+	fd_log_debug("\t-Max invalid EAP packets: %u", diameap_config->max_invalid_eap_packet);
+	fd_log_debug("\t-Multi-Round Timeout....: %u", diameap_config->multi_round_time_out);
 	if (diameap_config->db.user)
 	{
-		fd_log_debug("\t-MySQL Database Params..: \n\t\tUser .......:%s\n",
-				diameap_config->db.user);
-		fd_log_debug("\t\tServer .....:%s\n", diameap_config->db.server);
-		fd_log_debug("\t\tDatabase....:%s\n", diameap_config->db.database);
+		fd_log_debug("\t-MySQL Database Params..:");
+		fd_log_debug("\t\tUser .......:%s", diameap_config->db.user);
+		fd_log_debug("\t\tServer .....:%s", diameap_config->db.server);
+		fd_log_debug("\t\tDatabase....:%s", diameap_config->db.database);
 	}
 
-	fd_log_debug("\t-EAP Method Plugins.....: \n");
+	fd_log_debug("\t-EAP Method Plugins.....: ");
 	diameap_plugin_dump();
 
-	fd_log_debug(
-			"-------- DiamEAP extension : Configuration parameters (End) ---------------\n");
+	fd_log_debug("-------- DiamEAP extension : Configuration parameters (End) ---------------");
 }
 
 int diameap_init(char * conffile)
--- a/extensions/app_diameap/diameap_plugins.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/app_diameap/diameap_plugins.c	Thu Mar 14 18:14:35 2013 +0100
@@ -75,7 +75,7 @@
 	for (pl = plugins_list.next; pl != &plugins_list; pl = pl->next)
 	{
 		struct plugin * plugin = (struct plugin *) pl;
-		fd_log_debug("\t\t - %s plugin \t [Type: %i, Vendor: %i]  %sloaded\n", plugin->methodname,
+		fd_log_debug("\t\t - %s plugin \t [Type: %i, Vendor: %i]  %sloaded", plugin->methodname,
 				plugin->methodtype,plugin->vendor, plugin->handler ? "" : "not ");
 	}
 }
--- a/extensions/app_radgw/radius.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/app_radgw/radius.c	Thu Mar 14 18:14:35 2013 +0100
@@ -319,11 +319,11 @@
 	
 	auth =  &(msg->radius.hdr->authenticator[0]);
 	
-	fd_log_debug("------ RADIUS msg dump -------\n");
-	fd_log_debug(" id  : 0x%02hhx, code : %hhd (%s), length : %d\n", msg->radius.hdr->identifier, msg->radius.hdr->code, rgw_msg_code_str(msg->radius.hdr->code), ntohs(msg->radius.hdr->length));
-	fd_log_debug(" auth: %02hhx %02hhx %02hhx %02hhx  %02hhx %02hhx %02hhx %02hhx\n",
+	fd_log_debug("------ RADIUS msg dump -------");
+	fd_log_debug(" id  : 0x%02hhx, code : %hhd (%s), length : %d", msg->radius.hdr->identifier, msg->radius.hdr->code, rgw_msg_code_str(msg->radius.hdr->code), ntohs(msg->radius.hdr->length));
+	fd_log_debug(" auth: %02hhx %02hhx %02hhx %02hhx  %02hhx %02hhx %02hhx %02hhx",
 			auth[0], auth[1], auth[2], auth[3], auth[4], auth[5], auth[6], auth[7]);
-	fd_log_debug("       %02hhx %02hhx %02hhx %02hhx  %02hhx %02hhx %02hhx %02hhx\n",
+	fd_log_debug("       %02hhx %02hhx %02hhx %02hhx  %02hhx %02hhx %02hhx %02hhx",
 			auth[8],  auth[9],  auth[10], auth[11], auth[12], auth[13], auth[14], auth[15]);
 	for (i = 0; i < msg->radius.attr_used; i++) {
 		struct radius_attr_hdr *attr = (struct radius_attr_hdr *)(msg->radius.buf + msg->radius.attr_pos[i]);
@@ -331,14 +331,14 @@
 		radius_msg_dump_attr_val(attr);
 	}
 	if (has_meta && msg->ps_nb) {
-		fd_log_debug("---- hidden attributes:\n");
+		fd_log_debug("---- hidden attributes:");
 		for (i = msg->ps_first; i < msg->ps_first + msg->ps_nb; i++) {
 			struct radius_attr_hdr *attr = (struct radius_attr_hdr *)(msg->radius.buf + msg->radius.attr_pos[i]);
 			fd_log_debug("    - Type: 0x%02hhx (%s)\n       Len: %-3hhu", attr->type, rgw_msg_attrtype_str(attr->type), attr->length);
 			radius_msg_dump_attr_val(attr);
 		}
 	}
-	fd_log_debug("-----------------------------\n");
+	fd_log_debug("-----------------------------");
 }
 
 
@@ -526,12 +526,12 @@
 	hdr = (struct radius_hdr *) buf;
 	msg_len = ntohs(hdr->length);
 	if (msg_len < sizeof(*hdr) || msg_len > len) {
-		TRACE_DEBUG(INFO, "Invalid RADIUS message length\n");
+		TRACE_DEBUG(INFO, "Invalid RADIUS message length");
 		return EINVAL;
 	}
 
 	if (msg_len < len) {
-		TRACE_DEBUG(INFO, "Ignored %lu extra bytes after RADIUS message\n",
+		TRACE_DEBUG(INFO, "Ignored %lu extra bytes after RADIUS message",
 		       (unsigned long) len - msg_len);
 	}
 
--- a/extensions/app_radgw/rgw_clients.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/app_radgw/rgw_clients.c	Thu Mar 14 18:14:35 2013 +0100
@@ -982,11 +982,11 @@
 	CHECK_POSIX_DO( pthread_rwlock_rdlock(&cli_rwl), /* ignore error */ );
 	
 	if (!FD_IS_LIST_EMPTY(&cli_ip))
-		fd_log_debug(" RADIUS IP clients list:\n");
+		fd_log_debug(" RADIUS IP clients list:");
 	dump_cli_list(&cli_ip);
 		
 	if (!FD_IS_LIST_EMPTY(&cli_ip6))
-		fd_log_debug(" RADIUS IPv6 clients list:\n");
+		fd_log_debug(" RADIUS IPv6 clients list:");
 	dump_cli_list(&cli_ip6);
 		
 	CHECK_POSIX_DO( pthread_rwlock_unlock(&cli_rwl), /* ignore error */ );
--- a/extensions/app_radgw/rgw_conf.l	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/app_radgw/rgw_conf.l	Thu Mar 14 18:14:35 2013 +0100
@@ -88,7 +88,7 @@
 				/* First copy the string without the quotes for use in the yacc parser */
 				yylval->string = strdup(yytext+1);
 				if (yylval->string == NULL) {
-					fd_log_debug("Unable to allocate memory: %s\n", strerror(errno));
+					fd_log_debug("Unable to allocate memory: %s", strerror(errno));
 					return LEX_ERROR; /* trig an error in yacc parser */
 				}
 
@@ -110,7 +110,7 @@
 				int ret = sscanf(yytext, "%x", &yylval->integer);
 				if (ret != 1) {
 					/* No matching: an error occurred */
-					fd_log_debug("Unable to convert the value '%s' to a valid number: %s\n", yytext, strerror(errno));
+					fd_log_debug("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? */
 				}
@@ -132,7 +132,7 @@
 				
 				work = strdup(yytext);
 				if ( work == NULL ) {
-					fd_log_debug("Unable to allocate memory: %s\n", strerror(errno));
+					fd_log_debug("Unable to allocate memory: %s", strerror(errno));
 					return LEX_ERROR; /* trig an error in yacc parser */
 				}
 				
@@ -140,7 +140,7 @@
 					*port = '\0';
 					port++;
 					if (sscanf(port, "%hu]", &p) != 1) {
-						fd_log_debug("'%s' is not a valid port: %s\n", port, strerror(errno));
+						fd_log_debug("'%s' is not a valid port: %s", port, strerror(errno));
 						free(work);
 						return LEX_ERROR; /* trig an error in yacc parser */
 					}
@@ -152,7 +152,7 @@
 				
 					sin6 = malloc(sizeof(struct sockaddr_in6));
 					if (sin6 == NULL) {
-						fd_log_debug("Unable to allocate memory: %s\n", strerror(errno));
+						fd_log_debug("Unable to allocate memory: %s", strerror(errno));
 						free(work);
 						return LEX_ERROR; /* trig an error in yacc parser */
 					}
@@ -160,7 +160,7 @@
 					memset(sin6, 0, sizeof(struct sockaddr_in6));
 					sin6->sin6_family = AF_INET6;
 					if (inet_pton(AF_INET6, work, &sin6->sin6_addr) != 1) {
-						fd_log_debug("'%s' is not a valid IPv6 address: %s\n", work, strerror(errno));
+						fd_log_debug("'%s' is not a valid IPv6 address: %s", work, strerror(errno));
 						free(work);
 						free(sin6);
 						return LEX_ERROR; /* trig an error in yacc parser */
@@ -172,7 +172,7 @@
 				
 					sin = malloc(sizeof(struct sockaddr_in));
 					if (sin == NULL) {
-						fd_log_debug("Unable to allocate memory: %s\n", strerror(errno));
+						fd_log_debug("Unable to allocate memory: %s", strerror(errno));
 						free(work);
 						return LEX_ERROR; /* trig an error in yacc parser */
 					}
@@ -180,7 +180,7 @@
 					memset(sin, 0, sizeof(struct sockaddr_in));
 					sin->sin_family = AF_INET;
 					if (inet_pton(AF_INET, work, &sin->sin_addr) != 1) {
-						fd_log_debug("'%s' is not a valid IP address: %s\n", work, strerror(errno));
+						fd_log_debug("'%s' is not a valid IP address: %s", work, strerror(errno));
 						free(work);
 						free(sin);
 						return LEX_ERROR; /* trig an error in yacc parser */
@@ -212,7 +212,7 @@
 					int ret = sscanf(yytext, "%d", &yylval->integer);
 					if (ret != 1) {
 						/* No matching: an error occurred */
-						fd_log_debug("Unable to convert the value '%s' to a valid number: %s\n", yytext, strerror(errno));
+						fd_log_debug("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? */
 					}
@@ -226,14 +226,14 @@
 				
 					sin = malloc(sizeof(struct sockaddr_in));
 					if (sin == NULL) {
-						fd_log_debug("Unable to allocate memory: %s\n", strerror(errno));
+						fd_log_debug("Unable to allocate memory: %s", strerror(errno));
 						return LEX_ERROR; /* trig an error in yacc parser */
 					}
 					
 					memset(sin, 0, sizeof(struct sockaddr_in));
 					sin->sin_family = AF_INET;
 					if (inet_pton(AF_INET, yytext, &sin->sin_addr) != 1) {
-						fd_log_debug("'%s' is not a valid IP address: %s\n", yytext, strerror(errno));
+						fd_log_debug("'%s' is not a valid IP address: %s", yytext, strerror(errno));
 						free(sin);
 						return LEX_ERROR; /* trig an error in yacc parser */
 					}
@@ -246,14 +246,14 @@
 				
 					sin6 = malloc(sizeof(struct sockaddr_in6));
 					if (sin6 == NULL) {
-						fd_log_debug("Unable to allocate memory: %s\n", strerror(errno));
+						fd_log_debug("Unable to allocate memory: %s", strerror(errno));
 						return LEX_ERROR; /* trig an error in yacc parser */
 					}
 					
 					memset(sin6, 0, sizeof(struct sockaddr_in6));
 					sin6->sin6_family = AF_INET6;
 					if (inet_pton(AF_INET6, yytext, &sin6->sin6_addr) != 1) {
-						fd_log_debug("'%s' is not a valid IPv6 address: %s\n", yytext, strerror(errno));
+						fd_log_debug("'%s' is not a valid IPv6 address: %s", yytext, strerror(errno));
 						free(sin6);
 						return LEX_ERROR; /* trig an error in yacc parser */
 					}
@@ -270,7 +270,7 @@
 <*>[[:alnum:]]+		|	/* This rule is only useful to print a complete token in error messages */
 	/* Unrecognized character */
 <*>.			{ 
-				fd_log_debug("Unrecognized text on line %d col %d: '%s'.\n", yylloc->first_line, yylloc->first_column, yytext);
+				fd_log_debug("Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext);
 			 	return LEX_ERROR; 
 			}
 
--- a/extensions/app_radgw/rgw_conf.y	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/app_radgw/rgw_conf.y	Thu Mar 14 18:14:35 2013 +0100
@@ -68,7 +68,7 @@
 	rgw_confin = fopen(conffile, "r");
 	if (rgw_confin == NULL) {
 		ret = errno;
-		fd_log_debug("Unable to open extension configuration file %s for reading: %s\n", conffile, strerror(ret));
+		fd_log_debug("Unable to open extension configuration file %s for reading: %s", conffile, strerror(ret));
 		return ret;
 	}
 
@@ -90,11 +90,11 @@
 void yyerror (YYLTYPE *ploc, char * conffile, char const *s)
 {
 	if (ploc->first_line != ploc->last_line)
-		fd_log_debug("%s:%d.%d-%d.%d : %s\n", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);
+		fd_log_debug("%s:%d.%d-%d.%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);
 	else if (ploc->first_column != ploc->last_column)
-		fd_log_debug("%s:%d.%d-%d : %s\n", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s);
+		fd_log_debug("%s:%d.%d-%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s);
 	else
-		fd_log_debug("%s:%d.%d : %s\n", conffile, ploc->first_line, ploc->first_column, s);
+		fd_log_debug("%s:%d.%d : %s", conffile, ploc->first_line, ploc->first_column, s);
 }
 
 /* Very simple byte stack management */
@@ -110,7 +110,7 @@
 		buf_rsz += 256;
 		rez = realloc(buf, buf_rsz);
 		if (rez == NULL) {
-			fd_log_debug("Error on memory allocation: %s\n", strerror(errno));
+			fd_log_debug("Error on memory allocation: %s", strerror(errno));
 			return 0;
 		}
 		buf = (unsigned char *)rez;
@@ -197,7 +197,7 @@
 				}
 				if (fd == NULL) {
 					int ret = errno;
-					TRACE_DEBUG(INFO, "Unable to open file %s for reading: %s\n", fname, strerror(ret));
+					TRACE_DEBUG(INFO, "Unable to open file %s for reading: %s", fname, strerror(ret));
 					yyerror (&yylloc, conffile, "Error adding plugin"); 
 					YYERROR;
 				}
--- a/extensions/app_radgw/rgw_plugins.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/app_radgw/rgw_plugins.c	Thu Mar 14 18:14:35 2013 +0100
@@ -187,7 +187,7 @@
 	new->dlo = dlopen(plgfile, RTLD_NOW | RTLD_GLOBAL);
 	if (new->dlo == NULL) {
 		/* An error occured */
-		fd_log_debug("Loading of plugin '%s' failed:\n %s\n", plgfile, dlerror());
+		fd_log_debug("Loading of plugin '%s' failed: %s", plgfile, dlerror());
 		goto error;
 	}
 	
@@ -195,7 +195,7 @@
 	new->descriptor = dlsym( new->dlo, "rgwp_descriptor" );
 	if (new->descriptor == NULL) {
 		/* An error occured */
-		fd_log_debug("Unable to resolve 'rgwp_descriptor' in plugin '%s':\n %s\n", plgfile, dlerror());
+		fd_log_debug("Unable to resolve 'rgwp_descriptor' in plugin '%s': %s", plgfile, dlerror());
 		goto error;
 	}
 	
@@ -205,7 +205,7 @@
 	if (new->descriptor->rgwp_conf_parse) {
 		CHECK_FCT_DO( (*(new->descriptor->rgwp_conf_parse))(conffile, &new->cs), 
 			{
-				fd_log_debug("An error occurred while parsing configuration file '%s' in plugin '%s', aborting...\n", conffile, plgfile);
+				fd_log_debug("An error occurred while parsing configuration file '%s' in plugin '%s', aborting...", conffile, plgfile);
 				goto error;
 			} );
 	}
@@ -265,26 +265,26 @@
 	CHECK_POSIX_DO( pthread_rwlock_rdlock(&plg_lock), );
 	
 	if ( ! FD_IS_LIST_EMPTY( &plg_list ) )
-		fd_log_debug("[app_radgw]  --- List of registered plugins:\n");
+		fd_log_debug("[app_radgw]  --- List of registered plugins:");
 	for (ptr = plg_list.next; ptr != &plg_list; ptr = ptr->next) {
-		
+		char buf[1024];
 		plg = (struct plg_descr *)ptr;
 		
-		fd_log_debug("  %-25s ( %p ) - types: %s%s, codes: ", 
-				plg->descriptor->rgwp_name, 
-				plg->cs,
-				plg->type & RGW_PLG_TYPE_AUTH ? "Au" : "  ",
-				plg->type & RGW_PLG_TYPE_ACCT ? "Ac" : "  ");
+		snprintf(buf, sizeof(buf), "  %-25s ( %p ) - types: %s%s, codes: ", 
+			 plg->descriptor->rgwp_name, 
+			 plg->cs,
+			 plg->type & RGW_PLG_TYPE_AUTH ? "Au" : "  ",
+			 plg->type & RGW_PLG_TYPE_ACCT ? "Ac" : "  ");
 		
 		if (plg->cc) {
 			int i;
 			
 			for (i = 0; i < plg->cc_len; i++) {
-				fd_log_debug("%02hhx ", plg->cc[i]);
+				snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), "%02hhx ", plg->cc[i]);
 			}
-			fd_log_debug("\n");
+			fd_log_debug("%s", buf);
 		} else {
-			fd_log_debug("*\n");
+			fd_log_debug("%s*", buf);
 		}
 	}
 	
@@ -296,24 +296,24 @@
 	
 	CHECK_POSIX_DO( pthread_rwlock_rdlock(&plg_lock), );
 	if ( !FD_IS_LIST_EMPTY( &plg_accel_auth ) || !FD_IS_LIST_EMPTY( &plg_accel_acct ))
-		fd_log_debug("  --- Accelerators:\n");
+		fd_log_debug("  --- Accelerators:");
 	
 	for (ptraccel = plg_accel_auth.next; ptraccel != &plg_accel_auth; ptraccel = ptraccel->next) {
 		struct plg_accel * accel = (struct plg_accel *)ptraccel;
-		fd_log_debug("  auth, code %02hhu:\n", accel->ccode);
+		fd_log_debug("  auth, code %02hhu:", accel->ccode);
 
 		for (ptr = accel->plugins.next; ptr != &accel->plugins; ptr = ptr->next) {
 			struct plg_accel_item * item = (struct plg_accel_item *)ptr;
-			fd_log_debug("     %-15s (%p)\n", item->plg->descriptor->rgwp_name, item->plg->cs);
+			fd_log_debug("     %-15s (%p)", item->plg->descriptor->rgwp_name, item->plg->cs);
 		}
 	}
 	for (ptraccel = plg_accel_acct.next; ptraccel != &plg_accel_acct; ptraccel = ptraccel->next) {
 		struct plg_accel * accel = (struct plg_accel *)ptraccel;
-		fd_log_debug("  acct, code %02hhu:\n", accel->ccode);
+		fd_log_debug("  acct, code %02hhu:", accel->ccode);
 
 		for (ptr = accel->plugins.next; ptr != &accel->plugins; ptr = ptr->next) {
 			struct plg_accel_item * item = (struct plg_accel_item *)ptr;
-			fd_log_debug("     %-15s (%p)\n", item->plg->descriptor->rgwp_name, item->plg->cs);
+			fd_log_debug("     %-15s (%p)", item->plg->descriptor->rgwp_name, item->plg->cs);
 		}
 	}
 	
@@ -379,7 +379,7 @@
 	
 	if (ret > 0) {
 		/* Critical error, log and exit */
-		TRACE_DEBUG(NONE, "An error occurred while handling a RADIUS message from '%s': %s\n", rgw_clients_id(cli), strerror(ret));
+		TRACE_DEBUG(NONE, "An error occurred while handling a RADIUS message from '%s': %s", rgw_clients_id(cli), strerror(ret));
 		return ret;
 	}
 	
@@ -435,7 +435,7 @@
 	
 	if (ret > 0) {
 		/* Critical error, log and exit */
-		fd_log_debug("[app_radgw] An error occurred while handling a DIAMETER answer to a converted RADIUS request, turn on DEBUG for details: %s\n", strerror(ret));
+		fd_log_debug("[app_radgw] An error occurred while handling a DIAMETER answer to a converted RADIUS request, turn on DEBUG for details: %s", strerror(ret));
 		return ret;
 	}
 	
--- a/extensions/app_radgw/rgw_servers.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/app_radgw/rgw_servers.c	Thu Mar 14 18:14:35 2013 +0100
@@ -51,25 +51,25 @@
 	if ( ! TRACE_BOOL(FULL) )
 		return;
 	
-	fd_log_debug(" auth server:\n");
-	fd_log_debug("    disabled..... : %s\n", rgw_servers.auth_serv.disabled ? "TRUE":"false");
-	fd_log_debug("    IP disabled.. : %s\n", rgw_servers.auth_serv.ip_disabled ? "TRUE":"false");
-	fd_log_debug("    IPv6 disabled : %s\n", rgw_servers.auth_serv.ip6_disabled ? "TRUE":"false");
-	fd_log_debug("    port......... : %hu\n", ntohs(rgw_servers.auth_serv.port));
+	fd_log_debug(" auth server:");
+	fd_log_debug("    disabled..... : %s", rgw_servers.auth_serv.disabled ? "TRUE":"false");
+	fd_log_debug("    IP disabled.. : %s", rgw_servers.auth_serv.ip_disabled ? "TRUE":"false");
+	fd_log_debug("    IPv6 disabled : %s", rgw_servers.auth_serv.ip6_disabled ? "TRUE":"false");
+	fd_log_debug("    port......... : %hu", ntohs(rgw_servers.auth_serv.port));
 	inet_ntop(AF_INET, &rgw_servers.auth_serv.ip_endpoint,ipstr,sizeof(ipstr));
-	fd_log_debug("    IP bind...... : %s\n", ipstr);
+	fd_log_debug("    IP bind...... : %s", ipstr);
 	inet_ntop(AF_INET6, &rgw_servers.auth_serv.ip6_endpoint,ipstr,sizeof(ipstr));
-	fd_log_debug("    IPv6 bind.... : %s\n", ipstr);
+	fd_log_debug("    IPv6 bind.... : %s", ipstr);
 
-	fd_log_debug(" acct server:\n");
-	fd_log_debug("    disabled..... : %s\n", rgw_servers.acct_serv.disabled ? "TRUE":"false");
-	fd_log_debug("    IP disabled.. : %s\n", rgw_servers.acct_serv.ip_disabled ? "TRUE":"false");
-	fd_log_debug("    IPv6 disabled : %s\n", rgw_servers.acct_serv.ip6_disabled ? "TRUE":"false");
-	fd_log_debug("    port......... : %hu\n", ntohs(rgw_servers.acct_serv.port));
+	fd_log_debug(" acct server:");
+	fd_log_debug("    disabled..... : %s", rgw_servers.acct_serv.disabled ? "TRUE":"false");
+	fd_log_debug("    IP disabled.. : %s", rgw_servers.acct_serv.ip_disabled ? "TRUE":"false");
+	fd_log_debug("    IPv6 disabled : %s", rgw_servers.acct_serv.ip6_disabled ? "TRUE":"false");
+	fd_log_debug("    port......... : %hu", ntohs(rgw_servers.acct_serv.port));
 	inet_ntop(AF_INET, &rgw_servers.acct_serv.ip_endpoint,ipstr,sizeof(ipstr));
-	fd_log_debug("    IP bind...... : %s\n", ipstr);
+	fd_log_debug("    IP bind...... : %s", ipstr);
 	inet_ntop(AF_INET6, &rgw_servers.acct_serv.ip6_endpoint,ipstr,sizeof(ipstr));
-	fd_log_debug("    IPv6 bind.... : %s\n", ipstr);
+	fd_log_debug("    IPv6 bind.... : %s", ipstr);
 
 }
 
--- a/extensions/app_radgw/rgw_worker.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/app_radgw/rgw_worker.c	Thu Mar 14 18:14:35 2013 +0100
@@ -162,7 +162,7 @@
 		
 		/* Check the created Diameter message -- it will be invalid if no callback has handled the RADIUS message */
 		if ((diam_msg == NULL) || ( fd_msg_parse_rules(diam_msg, fd_g_config->cnf_dict, NULL) ) ) {
-			fd_log_debug("[radgw] No or invalid Diameter message was generated after processing the RADIUS command %hhd (%s).\n"
+			fd_log_debug("[radgw] No or invalid Diameter message was generated after processing the RADIUS command %hhd (%s)."
 					" It may indicate a gateway configuration problem, or implementation issue in a plugin.\n",
 					msg->radius.hdr->code, rgw_msg_code_str(msg->radius.hdr->code));
 			/* We should also dump the conflicting rule here to help debug? */
@@ -173,7 +173,7 @@
 		for (a = 0; a < msg->radius.attr_used; a++) {
 			struct radius_attr_hdr *attr = (struct radius_attr_hdr *)(msg->radius.buf + msg->radius.attr_pos[a]);
 			pb++;
-			fd_log_debug("[radgw] No plugin available to handle attribute %hhd (%s) in command %hhd (%s)! Translation aborted.\n",
+			fd_log_debug("[radgw] No plugin available to handle attribute %hhd (%s) in command %hhd (%s)! Translation aborted.",
 					attr->type, rgw_msg_attrtype_str(attr->type),
 					msg->radius.hdr->code, rgw_msg_code_str(msg->radius.hdr->code));
 		}
@@ -192,7 +192,7 @@
 			rgw_msg_free(&msg);
 			rgw_clients_dispose(&cli);
 			
-			TRACE_DEBUG(INFO, "%d problem(s) occurred while translating a RADIUS message, data discarded.\n", pb);
+			TRACE_DEBUG(INFO, "%d problem(s) occurred while translating a RADIUS message, data discarded.", pb);
 			continue;
 		}
 		
@@ -206,7 +206,7 @@
 		CHECK_FCT_DO( fd_msg_send( &diam_msg, receive_diam_answer, pa), 
 			{
 				/* If an error occurs, log and destroy the data */
-				fd_log_debug("An error occurred while sending Diameter message, please turn Debug on for detail.\n");
+				fd_log_debug("An error occurred while sending Diameter message, please turn Debug on for detail.");
 				if (session) {
 					CHECK_FCT_DO( fd_sess_destroy(&session), );
 				}
--- a/extensions/app_radgw/rgwx_acct.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/app_radgw/rgwx_acct.c	Thu Mar 14 18:14:35 2013 +0100
@@ -1265,25 +1265,25 @@
 			break;
 		
 		default:
-			fd_log_debug("[acct.rgwx] Received Diameter answer with error code '%d' from server '%.*s', session %.*s, not translating into Accounting-Response\n",
+			fd_log_debug("[acct.rgwx] Received Diameter answer with error code '%d' from server '%.*s', session %.*s, not translating into Accounting-Response",
 					ahdr->avp_value->u32, 
 					oh->avp_value->os.len, oh->avp_value->os.data,
 					sid->avp_value->os.len, sid->avp_value->os.data);
 			CHECK_FCT( fd_msg_search_avp (*diam_ans, cs->dict.Error_Message, &avp) );
 			if (avp) {
 				CHECK_FCT( fd_msg_avp_hdr ( avp, &ahdr ) );
-				fd_log_debug("[acct.rgwx]   Error-Message content: '%.*s'\n",
+				fd_log_debug("[acct.rgwx]   Error-Message content: '%.*s'",
 						ahdr->avp_value->os.len, ahdr->avp_value->os.data);
 			}
 			CHECK_FCT( fd_msg_search_avp (*diam_ans, cs->dict.Error_Reporting_Host, &avp) );
 			if (avp) {
 				CHECK_FCT( fd_msg_avp_hdr ( avp, &ahdr ) );
-				fd_log_debug("[acct.rgwx]   Error-Reporting-Host: '%.*s'\n",
+				fd_log_debug("[acct.rgwx]   Error-Reporting-Host: '%.*s'",
 						ahdr->avp_value->os.len, ahdr->avp_value->os.data);
 			}
 			CHECK_FCT( fd_msg_search_avp (*diam_ans, cs->dict.Failed_AVP, &avp) );
 			if (avp) {
-				fd_log_debug("[acct.rgwx]   Failed-AVP was included in the message.\n");
+				fd_log_debug("[acct.rgwx]   Failed-AVP was included in the message.");
 				/* Dump its content ? */
 			}
 			
--- a/extensions/app_radgw/rgwx_auth.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/app_radgw/rgwx_auth.c	Thu Mar 14 18:14:35 2013 +0100
@@ -1236,25 +1236,25 @@
 			}
 			/* In any case, the following is processed: */
 			(*rad_fw)->hdr->code = RADIUS_CODE_ACCESS_REJECT;
-			fd_log_debug("[auth.rgwx] Received Diameter answer with error code '%d' from server '%.*s', session %.*s, translating into Access-Reject\n",
+			fd_log_debug("[auth.rgwx] Received Diameter answer with error code '%d' from server '%.*s', session %.*s, translating into Access-Reject",
 					ahdr->avp_value->u32, 
 					oh->avp_value->os.len, oh->avp_value->os.data,
 					sid->avp_value->os.len, sid->avp_value->os.data);
 			CHECK_FCT( fd_msg_search_avp (*diam_ans, cs->dict.Error_Message, &avp_x) );
 			if (avp_x) {
 				CHECK_FCT( fd_msg_avp_hdr ( avp_x, &ahdr ) );
-				fd_log_debug("[auth.rgwx]   Error-Message content: '%.*s'\n",
+				fd_log_debug("[auth.rgwx]   Error-Message content: '%.*s'",
 						ahdr->avp_value->os.len, ahdr->avp_value->os.data);
 			}
 			CHECK_FCT( fd_msg_search_avp (*diam_ans, cs->dict.Error_Reporting_Host, &avp_x) );
 			if (avp_x) {
 				CHECK_FCT( fd_msg_avp_hdr ( avp_x, &ahdr ) );
-				fd_log_debug("[auth.rgwx]   Error-Reporting-Host: '%.*s'\n",
+				fd_log_debug("[auth.rgwx]   Error-Reporting-Host: '%.*s'",
 						ahdr->avp_value->os.len, ahdr->avp_value->os.data);
 			}
 			CHECK_FCT( fd_msg_search_avp (*diam_ans, cs->dict.Failed_AVP, &avp_x) );
 			if (avp_x) {
-				fd_log_debug("[auth.rgwx]   Failed-AVP was included in the message.\n");
+				fd_log_debug("[auth.rgwx]   Failed-AVP was included in the message.");
 				/* Dump its content ? */
 			}
 	}
@@ -1448,7 +1448,7 @@
 				case DIAM_ATTR_AUTH_REQUEST_TYPE:
 					/* We only check the value */
 					if (ahdr->avp_value->u32 != 3) {
-						fd_log_debug("[auth.rgwx] Received Diameter answer with Auth-Request-Type set to %d (%s) from server %.*s, session %.*s.\n"
+						fd_log_debug("[auth.rgwx] Received Diameter answer with Auth-Request-Type set to %d (%s) from server %.*s, session %.*s."
 								"  This may cause interoperability problems with RADIUS.\n",
 								ahdr->avp_value->u32,
 								(ahdr->avp_value->u32 == 1) ? "AUTHENTICATE_ONLY" :
@@ -1613,7 +1613,7 @@
 					
 				case DIAM_ATTR_NAS_FILTER_RULE:
 					/* This is not translatable to RADIUS */
-					fd_log_debug("[auth.rgwx] Received Diameter answer with non-translatable NAS-Filter-Rule AVP from '%.*s' (session: '%.*s'), ignoring.\n",
+					fd_log_debug("[auth.rgwx] Received Diameter answer with non-translatable NAS-Filter-Rule AVP from '%.*s' (session: '%.*s'), ignoring.",
 							oh->avp_value->os.len, oh->avp_value->os.data,
 							sid->avp_value->os.len, sid->avp_value->os.data);
 					handled = 0;
@@ -1646,7 +1646,7 @@
 					
 				case DIAM_ATTR_QOS_FILTER_RULE:
 					/* This is not translatable to RADIUS */
-					fd_log_debug("[auth.rgwx] Received Diameter answer with non-translatable QoS-Filter-Rule AVP from '%.*s' (session: '%.*s'), ignoring.\n",
+					fd_log_debug("[auth.rgwx] Received Diameter answer with non-translatable QoS-Filter-Rule AVP from '%.*s' (session: '%.*s'), ignoring.",
 							oh->avp_value->os.len, oh->avp_value->os.data,
 							sid->avp_value->os.len, sid->avp_value->os.data);
 					handled = 0;
@@ -1855,7 +1855,7 @@
 						CHECK_FCT(rgw_clients_getkey(cli, &secret, &secret_len));
 						
 						if (ahdr->avp_value->os.len != 64) {
-							TRACE_DEBUG(INFO, "Received EAP-Master-Session-Key attribute with length %d != 64.\n", ahdr->avp_value->os.len)
+							TRACE_DEBUG(INFO, "Received EAP-Master-Session-Key attribute with length %d != 64.", ahdr->avp_value->os.len)
 						}
 						
 						CHECK_PARAMS(ahdr->avp_value->os.len <= 64);
--- a/extensions/app_radgw/rgwx_debug.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/app_radgw/rgwx_debug.c	Thu Mar 14 18:14:35 2013 +0100
@@ -56,16 +56,16 @@
 	size_t i;
 	
 	auth =  &(msg->hdr->authenticator[0]);
-	fd_log_debug(" id  : 0x%02hhx, code: %hhd (%s)\n", msg->hdr->identifier, msg->hdr->code, rgw_msg_code_str(msg->hdr->code));
-	fd_log_debug(" auth: %02hhx %02hhx %02hhx %02hhx  %02hhx %02hhx %02hhx %02hhx\n",
+	fd_log_debug(" id  : 0x%02hhx, code: %hhd (%s)", msg->hdr->identifier, msg->hdr->code, rgw_msg_code_str(msg->hdr->code));
+	fd_log_debug(" auth: %02hhx %02hhx %02hhx %02hhx  %02hhx %02hhx %02hhx %02hhx",
 			auth[0], auth[1], auth[2], auth[3], 
 			auth[4], auth[5], auth[6], auth[7]);
-	fd_log_debug("       %02hhx %02hhx %02hhx %02hhx  %02hhx %02hhx %02hhx %02hhx\n",
+	fd_log_debug("       %02hhx %02hhx %02hhx %02hhx  %02hhx %02hhx %02hhx %02hhx",
 			auth[8],  auth[9],  auth[10], auth[11], 
 			auth[12], auth[13], auth[14], auth[15]);
 	for (i = 0; i < msg->attr_used; i++) {
 		struct radius_attr_hdr *attr = (struct radius_attr_hdr *)(msg->buf + msg->attr_pos[i]);
-		fd_log_debug("  - len:%3hhu, type:0x%02hhx (%s)\n", attr->length, attr->type, rgw_msg_attrtype_str(attr->type));
+		fd_log_debug("  - len:%3hhu, type:0x%02hhx (%s)", attr->length, attr->type, rgw_msg_attrtype_str(attr->type));
 		/* If we need to dump the value, it's better to call directly radius_msg_dump instead... */
 	}
 }
@@ -75,40 +75,40 @@
 {
 	TRACE_ENTRY("%p %p %p %p %p %p", cs, session, rad_req, rad_ans, diam_fw, cli);
 	
-	fd_log_debug("------------- RADIUS/Diameter Request Debug%s%s%s -------------\n", cs ? " [" : "", cs ? (char *)cs : "", cs ? "]" : "");
+	fd_log_debug("------------- RADIUS/Diameter Request Debug%s%s%s -------------", cs ? " [" : "", cs ? (char *)cs : "", cs ? "]" : "");
 	
 	if (!rad_req) {
-		fd_log_debug(" RADIUS request: NULL pointer\n");
+		fd_log_debug(" RADIUS request: NULL pointer");
 	} else {
-		fd_log_debug(" RADIUS request (%p) DUMP:\n", rad_req);
+		fd_log_debug(" RADIUS request (%p) DUMP:", rad_req);
 		debug_dump_radius(rad_req);
 	}
 	
 	if (!rad_ans || ! *rad_ans) {
-		fd_log_debug(" RADIUS answer: NULL pointer\n");
+		fd_log_debug(" RADIUS answer: NULL pointer");
 	} else {
-		fd_log_debug(" RADIUS answer (%p) DUMP:\n", *rad_ans);
+		fd_log_debug(" RADIUS answer (%p) DUMP:", *rad_ans);
 		debug_dump_radius(*rad_ans);
 	}
 	
 	if (!diam_fw || ! *diam_fw) {
-		fd_log_debug(" Diameter message: NULL pointer\n");
+		fd_log_debug(" Diameter message: NULL pointer");
 	} else {
-		fd_log_debug(" Diameter message (%p) DUMP:\n", *diam_fw);
+		fd_log_debug(" Diameter message (%p) DUMP:", *diam_fw);
 		fd_msg_dump_walk(0, *diam_fw);
 	}
 	
 	if (!session || ! *session) {
-		fd_log_debug(" Diameter session: NULL pointer\n");
+		fd_log_debug(" Diameter session: NULL pointer");
 	} else {
 		os0_t str;
 		size_t str_len;
 		CHECK_FCT( fd_sess_getsid(*session, &str, &str_len) );
 
-		fd_log_debug(" Diameter session: %s\n", str);
+		fd_log_debug(" Diameter session: %s", str);
 	}
 	
-	fd_log_debug("===========  Debug%s%s%s complete =============\n", cs ? " [" : "", cs ? (char *)cs : "", cs ? "]" : "");
+	fd_log_debug("===========  Debug%s%s%s complete =============", cs ? " [" : "", cs ? (char *)cs : "", cs ? "]" : "");
 	
 	return 0;
 }
@@ -118,23 +118,23 @@
 {
 	TRACE_ENTRY("%p %p %p %p %p %p", cs, session, diam_ans, rad_fw, cli, stateful);
 
-	fd_log_debug("------------- RADIUS/Diameter Answer Debug%s%s%s -------------\n", cs ? " [" : "", cs ? (char *)cs : "", cs ? "]" : "");
+	fd_log_debug("------------- RADIUS/Diameter Answer Debug%s%s%s -------------", cs ? " [" : "", cs ? (char *)cs : "", cs ? "]" : "");
 	
 	if (!diam_ans || ! *diam_ans) {
-		fd_log_debug(" Diameter message: NULL pointer\n");
+		fd_log_debug(" Diameter message: NULL pointer");
 	} else {
-		fd_log_debug(" Diameter message (%p) DUMP:\n", *diam_ans);
+		fd_log_debug(" Diameter message (%p) DUMP:", *diam_ans);
 		fd_msg_dump_walk(0, *diam_ans);
 	}
 	
 	if (!rad_fw || ! *rad_fw) {
-		fd_log_debug(" RADIUS answer: NULL pointer\n");
+		fd_log_debug(" RADIUS answer: NULL pointer");
 	} else {
-		fd_log_debug(" RADIUS answer (%p) DUMP:\n", *rad_fw);
+		fd_log_debug(" RADIUS answer (%p) DUMP:", *rad_fw);
 		debug_dump_radius(*rad_fw);
 	}
 	
-	fd_log_debug("===========  Debug%s%s%s complete =============\n", cs ? " [" : "", cs ? (char *)cs : "", cs ? "]" : "");
+	fd_log_debug("===========  Debug%s%s%s complete =============", cs ? " [" : "", cs ? (char *)cs : "", cs ? "]" : "");
 	return 0;
 }
 
--- a/extensions/app_radgw/rgwx_echodrop.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/app_radgw/rgwx_echodrop.c	Thu Mar 14 18:14:35 2013 +0100
@@ -59,7 +59,7 @@
 	
 	TRACE_ENTRY("%p %p", conffile, state);
 	CHECK_PARAMS( state );
-	CHECK_PARAMS_DO( conffile, { fd_log_debug("[echodrop.rgwx] The configuration file is not optional for this plugin.\n"); return EINVAL; } );
+	CHECK_PARAMS_DO( conffile, { fd_log_debug("[echodrop.rgwx] The configuration file is not optional for this plugin."); return EINVAL; } );
 	
 	CHECK_MALLOC( new = malloc(sizeof(struct rgwp_config)) );
 	memset(new, 0, sizeof(struct rgwp_config));
@@ -81,18 +81,18 @@
 			struct ed_conf_attribute * eca = (struct ed_conf_attribute *)li;
 			char * act = (eca->action == ACT_ECHO) ? "ECHO" : "DROP";
 			if (eca->ext) {
-				fd_log_debug("  %s Code: %hhu, Vendor: %u, Ext-Type: %hu\n", act, eca->code, eca->vendor_id, eca->extype);
+				fd_log_debug("  %s Code: %hhu, Vendor: %u, Ext-Type: %hu", act, eca->code, eca->vendor_id, eca->extype);
 				continue;
 			}
 			if (eca->tlv) {
-				fd_log_debug("  %s Code: %hhu, Vendor: %u, Type: %hhu\n", act, eca->code, eca->vendor_id, eca->type);
+				fd_log_debug("  %s Code: %hhu, Vendor: %u, Type: %hhu", act, eca->code, eca->vendor_id, eca->type);
 				continue;
 			}
 			if (eca->vsa) {
-				fd_log_debug("  %s Code: %hhu, Vendor: %u\n", act, eca->code, eca->vendor_id);
+				fd_log_debug("  %s Code: %hhu, Vendor: %u", act, eca->code, eca->vendor_id);
 				continue;
 			}
-			fd_log_debug("  %s Code: %hhu\n", act, eca->code);
+			fd_log_debug("  %s Code: %hhu", act, eca->code);
 		}
 	}
 	
@@ -185,7 +185,7 @@
 			
 			if (eca->ext) {
 				/* To be done */
-				fd_log_debug("Extended attributes are not implemented yet!\n");
+				fd_log_debug("Extended attributes are not implemented yet!");
 				ASSERT(0);
 				continue;
 			}
@@ -218,7 +218,7 @@
 	if (!FD_IS_LIST_EMPTY(&echo_list)) {
 		CHECK_PARAMS_DO(*session,
 			{
-				fd_log_debug(	"[echodrop.rgwx] The extension is configured to echo some attributes from this message, but no session object has been created for it (yet).\n"
+				fd_log_debug(	"[echodrop.rgwx] The extension is configured to echo some attributes from this message, but no session object has been created for it (yet)."
 						"  Please check your configuration file and include a session-generating extension BEFORE calling echodrop.rgwx to echo attributes.\n"
 						"  Please use debug.rgwx to retrieve more information.\n" );
 				return EINVAL;
--- a/extensions/app_radgw/rgwx_echodrop.l	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/app_radgw/rgwx_echodrop.l	Thu Mar 14 18:14:35 2013 +0100
@@ -70,7 +70,7 @@
 				int ret = sscanf(yytext, "%d", &yylval->integer);
 				if (ret != 1) {
 					/* No matching: an error occurred */
-					fd_log_debug("[echodrop.rgwx] Unable to convert the value '%s' to a valid number: %s\n", yytext, strerror(errno));
+					fd_log_debug("[echodrop.rgwx] 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? */
 				}
@@ -92,7 +92,7 @@
 <*>[[:alnum:]]+		|	/* This rule is only useful to print a complete token in error messages */
 	/* Unrecognized character */
 <*>.			{ 
-				fd_log_debug("[echodrop.rgwx] Unrecognized text on line %d col %d: '%s'.\n", yylloc->first_line, yylloc->first_column, yytext);
+				fd_log_debug("[echodrop.rgwx] Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext);
 			 	return LEX_ERROR; 
 			}
 
--- a/extensions/app_radgw/rgwx_echodrop.y	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/app_radgw/rgwx_echodrop.y	Thu Mar 14 18:14:35 2013 +0100
@@ -77,7 +77,7 @@
 	}
 	if (rgwx_echodropin == NULL) {
 		ret = errno;
-		fd_log_debug("[echodrop.rgwx] Unable to open plugin configuration file %s for reading: %s\n", conffile, strerror(ret));
+		fd_log_debug("[echodrop.rgwx] Unable to open plugin configuration file %s for reading: %s", conffile, strerror(ret));
 		return ret;
 	}
 
@@ -96,11 +96,11 @@
 void yyerror (YYLTYPE *ploc, char * conffile, struct rgwp_config *cs, char const *s)
 {
 	if (ploc->first_line != ploc->last_line)
-		fd_log_debug("%s:%d.%d-%d.%d : %s\n", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);
+		fd_log_debug("%s:%d.%d-%d.%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);
 	else if (ploc->first_column != ploc->last_column)
-		fd_log_debug("%s:%d.%d-%d : %s\n", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s);
+		fd_log_debug("%s:%d.%d-%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s);
 	else
-		fd_log_debug("%s:%d.%d : %s\n", conffile, ploc->first_line, ploc->first_column, s);
+		fd_log_debug("%s:%d.%d : %s", conffile, ploc->first_line, ploc->first_column, s);
 }
 
 static struct {
--- a/extensions/app_radgw/rgwx_sip.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/app_radgw/rgwx_sip.c	Thu Mar 14 18:14:35 2013 +0100
@@ -802,7 +802,7 @@
 		
 		default:
 			(*rad_fw)->hdr->code = RADIUS_CODE_ACCESS_REJECT;
-			fd_log_debug("[sip.rgwx] Received Diameter answer with error code '%d', session %.*s, translating into Access-Reject\n",
+			fd_log_debug("[sip.rgwx] Received Diameter answer with error code '%d', session %.*s, translating into Access-Reject",
 					ahdr->avp_value->u32, 
 					sid->avp_value->os.len, sid->avp_value->os.data);
 			return 0;
--- a/extensions/app_redirect/ard_conf.l	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/app_redirect/ard_conf.l	Thu Mar 14 18:14:35 2013 +0100
@@ -81,7 +81,7 @@
 				ret = sscanf(yytext, "%u", &yylval->u32);
 				if (ret != 1) {
 					/* No matching: an error occurred */
-					fd_log_debug("Unable to convert the value '%s' to a valid number: %s\n", yytext, strerror(errno));
+					fd_log_debug("Unable to convert the value '%s' to a valid number: %s", yytext, strerror(errno));
 					return TOK_LEX_ERROR; /* trig an error in yacc parser */
 					/* Maybe we could REJECT instead of failing here? */
 				}
@@ -93,7 +93,7 @@
 				/* Match a quoted string containing a regex */
 				CHECK_MALLOC_DO( yylval->tstring.str = strdup(yytext+2), 
 				{
-					TRACE_DEBUG(INFO, "Unable to copy the string '%s': %s\n", yytext, strerror(errno));
+					TRACE_DEBUG(INFO, "Unable to copy the string '%s': %s", yytext, strerror(errno));
 					return TOK_LEX_ERROR; /* trig an error in yacc parser */
 				} );
 				yylval->tstring.str[strlen(yytext) - 4] = '\0';
@@ -106,7 +106,7 @@
 				/* Match a quoted string. */
 				CHECK_MALLOC_DO( yylval->tstring.str = strdup(yytext+1), 
 				{
-					TRACE_DEBUG(INFO, "Unable to copy the string '%s': %s\n", yytext, strerror(errno));
+					TRACE_DEBUG(INFO, "Unable to copy the string '%s': %s", yytext, strerror(errno));
 					return TOK_LEX_ERROR; /* trig an error in yacc parser */
 				} );
 				yylval->tstring.str[strlen(yytext) - 2] = '\0';
@@ -133,7 +133,7 @@
 
 	/* Unrecognized sequence, if it did not match any previous pattern */
 [^[:space:]\":=;\n]+	{ 
-				fd_log_debug("Unrecognized text on line %d col %d: '%s'.\n", yylloc->first_line, yylloc->first_column, yytext);
+				fd_log_debug("Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext);
 			 	return TOK_LEX_ERROR; 
 			}
 
--- a/extensions/app_redirect/ard_conf.y	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/app_redirect/ard_conf.y	Thu Mar 14 18:14:35 2013 +0100
@@ -75,12 +75,12 @@
 	if (!TRACE_BOOL(FULL))
 		return;
 		
-	fd_log_debug("app_redirect: configuration dump:\n");
-	fd_log_debug("   default_redirect_cache_time : %u sec\n", ard_conf->default_rct);
+	fd_log_debug("app_redirect: configuration dump:");
+	fd_log_debug("   default_redirect_cache_time : %u sec", ard_conf->default_rct);
 	for (li = ard_conf->rules.next; li != &ard_conf->rules; li = li->next) {
 		ard_rule_dump(li->o);
 	}
-	fd_log_debug("app_redirect: end of configuration dump\n");
+	fd_log_debug("app_redirect: end of configuration dump");
 }
 
 /* Parse the configuration file */
--- a/extensions/app_redirect/ard_rules.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/app_redirect/ard_rules.c	Thu Mar 14 18:14:35 2013 +0100
@@ -53,35 +53,33 @@
 void ard_rule_dump(struct ard_rule * r)
 {
 	struct fd_list * li;
-	fd_log_debug("   rule @%p: %s, %us\n", r, redir_type_str[r->type], r->rct);
+	fd_log_debug("   rule @%p: %s, %us", r, redir_type_str[r->type], r->rct);
 	for (li = r->criteria.next; li != &r->criteria; li = li->next) {
 		struct ard_criteria * c = li->o;
-		fd_log_debug("      Criteria: ");
 		switch (c->type) {
 			case FROM_ID:
-				fd_log_debug("received from peer %s'%s'", c->is_regex?"REGEX":"", c->s);
+				fd_log_debug("      Criteria: received from peer %s'%s'", c->is_regex?"REGEX":"", c->s);
 				break;
 			case FROM_REALM:
-				fd_log_debug("received from realm %s'%s'", c->is_regex?"REGEX":"", c->s);
+				fd_log_debug("      Criteria: received from realm %s'%s'", c->is_regex?"REGEX":"", c->s);
 				break;
 			case APP_ID:
-				fd_log_debug("application id is %u", c->i);
+				fd_log_debug("      Criteria: application id is %u", c->i);
 				break;
 			case AVP_INT:
-				fd_log_debug("contains '%s' AVP with value '%d'", c->avp_info.avp_name, c->i);
+				fd_log_debug("      Criteria: contains '%s' AVP with value '%d'", c->avp_info.avp_name, c->i);
 				break;
 			case AVP_STR:
-				fd_log_debug("contains '%s' AVP with value %s'%s'", c->avp_info.avp_name, c->is_regex?"REGEX":"", c->s);
+				fd_log_debug("      Criteria: contains '%s' AVP with value %s'%s'", c->avp_info.avp_name, c->is_regex?"REGEX":"", c->s);
 				break;
 		
 			default:
-				fd_log_debug("invalid (%d)!", c->type);
+				fd_log_debug("      Criteria: invalid (%d)!", c->type);
 		}
-		fd_log_debug("\n");
 	}
 	for (li = r->targets.next; li != &r->targets; li = li->next) {
 		struct ard_target * t = li->o;
-		fd_log_debug("      Redirect to: '%s'\n", t->s);
+		fd_log_debug("      Redirect to: '%s'", t->s);
 	}
 }
 
--- a/extensions/app_sip/app_sip.l	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/app_sip/app_sip.l	Thu Mar 14 18:14:35 2013 +0100
@@ -78,7 +78,7 @@
 				ret = sscanf(yytext, "%i", &yylval->integer);
 				if (ret != 1) {
 					/* No matching: an error occurred */
-					fd_log_debug("Unable to convert the value '%s' to a valid number: %s\n", yytext, strerror(errno));
+					fd_log_debug("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? */
 				}
@@ -90,7 +90,7 @@
 				/* Match a quoted string. Let's be very permissive. */
 				yylval->string = strdup(yytext+1);
 				if (!yylval->string) {
-					fd_log_debug("Unable to copy the string '%s': %s\n", yytext, strerror(errno));
+					fd_log_debug("Unable to copy the string '%s': %s", yytext, strerror(errno));
 					TRACE_DEBUG(INFO, "strdup failed");
 					return LEX_ERROR; /* trig an error in yacc parser */
 				}
@@ -155,7 +155,7 @@
 
 	/* Unrecognized sequence, if it did not match any previous pattern */
 [^[:space:]"*=>;\n]+	{ 
-				fd_log_debug("Unrecognized text on line %d col %d: '%s'.\n", yylloc->first_line, yylloc->first_column, yytext);
+				fd_log_debug("Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext);
 			 	return LEX_ERROR; 
 			}
 
--- a/extensions/app_sip/app_sip.y	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/app_sip/app_sip.y	Thu Mar 14 18:14:35 2013 +0100
@@ -71,7 +71,7 @@
 	app_sipin = fopen(conffile, "r");
 	if (app_sipin == NULL) {
 		ret = errno;
-		fd_log_debug("Unable to open extension configuration file %s for reading: %s\n", conffile, strerror(ret));
+		fd_log_debug("Unable to open extension configuration file %s for reading: %s", conffile, strerror(ret));
 		TRACE_DEBUG (INFO, "Error occurred, message logged -- configuration file.");
 		return ret;
 	}
@@ -97,11 +97,11 @@
 	TRACE_DEBUG(INFO, "Error in configuration parsing");
 	
 	if (ploc->first_line != ploc->last_line)
-		fd_log_debug("%s:%d.%d-%d.%d : %s\n", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);
+		fd_log_debug("%s:%d.%d-%d.%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);
 	else if (ploc->first_column != ploc->last_column)
-		fd_log_debug("%s:%d.%d-%d : %s\n", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s);
+		fd_log_debug("%s:%d.%d-%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s);
 	else
-		fd_log_debug("%s:%d.%d : %s\n", conffile, ploc->first_line, ploc->first_column, s);
+		fd_log_debug("%s:%d.%d : %s", conffile, ploc->first_line, ploc->first_column, s);
 }
 
 %}
--- a/extensions/dbg_interactive/dbg_interactive.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/dbg_interactive/dbg_interactive.c	Thu Mar 14 18:14:35 2013 +0100
@@ -60,9 +60,12 @@
 	
 	CHECK_FCT_DO(fd_core_waitstartcomplete(), goto end);
 	
-	fd_log_debug("\nStarting interactive python interpreter [experimental].\n");
-	if (!arg) 
-		fd_log_debug("Example syntax:\n   >>> print cvar.fd_g_config.cnf_diamid\n   '%s'\n", fd_g_config->cnf_diamid);
+	fd_log_debug("Starting interactive python interpreter [experimental].");
+	if (!arg) {
+		fd_log_debug("Example syntax:");
+		fd_log_debug("   >>> print cvar.fd_g_config.cnf_diamid");
+		fd_log_debug("   '%s'", fd_g_config->cnf_diamid);
+	}
 	Py_Main(arg ? 2 : 1, dum);
 	
 end:	
--- a/extensions/dbg_monitor/dbg_monitor.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/dbg_monitor/dbg_monitor.c	Thu Mar 14 18:14:35 2013 +0100
@@ -60,13 +60,13 @@
 	while (1) {
 		#ifdef DEBUG
 		for (i++; i % 30; i++) {
-			fd_log_debug("[dbg_monitor] %ih%*im%*is\n", i/3600, 2, (i/60) % 60 , 2, i%60); /* This makes it easier to detect inactivity periods in the log file */
+			fd_log_debug("[dbg_monitor] %ih%*im%*is", i/3600, 2, (i/60) % 60 , 2, i%60); /* This makes it easier to detect inactivity periods in the log file */
 			sleep(1);
 		}
 		#else /* DEBUG */
 		sleep(3600); /* 1 hour */
 		#endif /* DEBUG */
-		fd_log_debug("[dbg_monitor] Dumping current information\n");
+		fd_log_debug("[dbg_monitor] Dumping current information");
 		CHECK_FCT_DO(fd_event_send(fd_g_config->cnf_main_ev, FDEV_DUMP_QUEUES, 0, NULL), /* continue */);
 		CHECK_FCT_DO(fd_event_send(fd_g_config->cnf_main_ev, FDEV_DUMP_SERV, 0, NULL), /* continue */);
 		CHECK_FCT_DO(fd_event_send(fd_g_config->cnf_main_ev, FDEV_DUMP_PEERS, 0, NULL), /* continue */);
@@ -79,7 +79,7 @@
 /* Function called on receipt of MONITOR_SIGNAL */
 static void got_sig()
 {
-	fd_log_debug("[dbg_monitor] Dumping extra information\n");
+	fd_log_debug("[dbg_monitor] Dumping extra information");
 	CHECK_FCT_DO(fd_event_send(fd_g_config->cnf_main_ev, FDEV_DUMP_DICT, 0, NULL), /* continue */);
 	CHECK_FCT_DO(fd_event_send(fd_g_config->cnf_main_ev, FDEV_DUMP_CONFIG, 0, NULL), /* continue */);
 	CHECK_FCT_DO(fd_event_send(fd_g_config->cnf_main_ev, FDEV_DUMP_EXT, 0, NULL), /* continue */);
--- a/extensions/dbg_rt/dbg_rt.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/dbg_rt/dbg_rt.c	Thu Mar 14 18:14:35 2013 +0100
@@ -47,7 +47,7 @@
 {
 	TRACE_ENTRY("%p %p", cbdata, msg);
 	
-	fd_log_debug("[dbg_rt] FWD routing message: %p\n", msg ? *msg : NULL);
+	fd_log_debug("[dbg_rt] FWD routing message: %p", msg ? *msg : NULL);
 	if (msg)
 		fd_msg_dump_walk(INFO, *msg);
 	
@@ -61,13 +61,13 @@
 	
 	TRACE_ENTRY("%p %p %p", cbdata, msg, candidates);
 	
-	fd_log_debug("[dbg_rt] OUT routing message: %p\n", msg);
+	fd_log_debug("[dbg_rt] OUT routing message: %p", msg);
 	fd_msg_dump_walk(INFO, msg);
-	fd_log_debug("[dbg_rt] Current list of candidates (%p): (score - id)\n", msg);
+	fd_log_debug("[dbg_rt] Current list of candidates (%p): (score - id)", msg);
 	
 	for (li = candidates->next; li != candidates; li = li->next) {
 		struct rtd_candidate *c = (struct rtd_candidate *) li;
-		fd_log_debug("[dbg_rt]   %d -\t%s\n", c->score, c->diamid);
+		fd_log_debug("[dbg_rt]   %d -\t%s", c->score, c->diamid);
 	}
 	
 	return 0;
--- a/extensions/dict_legacy_xml/dict_lxml.l	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/dict_legacy_xml/dict_lxml.l	Thu Mar 14 18:14:35 2013 +0100
@@ -79,7 +79,7 @@
 				/* Match a quoted string. */
 				CHECK_MALLOC_DO( yylval->string = strdup(yytext+1), 
 				{
-					TRACE_DEBUG(INFO, "Unable to copy the string '%s': %s\n", yytext, strerror(errno));
+					TRACE_DEBUG(INFO, "Unable to copy the string '%s': %s", yytext, strerror(errno));
 					return LEX_ERROR; /* trig an error in yacc parser */
 				} );
 				yylval->string[strlen(yytext) - 2] = '\0';
@@ -91,7 +91,7 @@
 
 	/* Unrecognized sequence, if it did not match any previous pattern */
 [^[:space:]\";\n]+	{ 
-				fd_log_debug("Unrecognized text on line %d col %d: '%s'.\n", yylloc->first_line, yylloc->first_column, yytext);
+				fd_log_debug("Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext);
 			 	return LEX_ERROR; 
 			}
 
--- a/extensions/dict_legacy_xml/dict_lxml.y	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/dict_legacy_xml/dict_lxml.y	Thu Mar 14 18:14:35 2013 +0100
@@ -71,7 +71,7 @@
 	dict_lxmlin = fopen(conffile, "r");
 	if (dict_lxmlin == NULL) {
 		ret = errno;
-		fd_log_debug("Unable to open extension configuration file %s for reading: %s\n", conffile, strerror(ret));
+		fd_log_debug("Unable to open extension configuration file %s for reading: %s", conffile, strerror(ret));
 		TRACE_DEBUG (INFO, "Error occurred, message logged -- configuration file.");
 		return ret;
 	}
@@ -99,11 +99,11 @@
 	TRACE_DEBUG(INFO, "Error in configuration parsing");
 	
 	if (ploc->first_line != ploc->last_line)
-		fd_log_debug("%s:%d.%d-%d.%d : %s\n", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);
+		fd_log_debug("%s:%d.%d-%d.%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);
 	else if (ploc->first_column != ploc->last_column)
-		fd_log_debug("%s:%d.%d-%d : %s\n", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s);
+		fd_log_debug("%s:%d.%d-%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s);
 	else
-		fd_log_debug("%s:%d.%d : %s\n", conffile, ploc->first_line, ploc->first_column, s);
+		fd_log_debug("%s:%d.%d : %s", conffile, ploc->first_line, ploc->first_column, s);
 }
 
 %}
--- a/extensions/dict_legacy_xml/dict_lxml_xml.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/dict_legacy_xml/dict_lxml_xml.c	Thu Mar 14 18:14:35 2013 +0100
@@ -122,7 +122,7 @@
 }
 
 static void dump_vendor(struct t_vend * v) {
-	fd_log_debug(" Vendor %d:'%s'\n", v->id, (char *)v->name);
+	fd_log_debug(" Vendor %d:'%s'", v->id, (char *)v->name);
 }
 
 static void del_vendor_contents(struct t_vend * v) {
@@ -174,7 +174,7 @@
 		fd_log_debug("m:%d ", r->min);
 	if (r->max != -1)
 		fd_log_debug("M:%d ", r->max);
-	fd_log_debug("%s\n", (char *)r->avpname);
+	fd_log_debug("%s", (char *)r->avpname);
 }
 
 static void del_rule_contents(struct t_rule * r) {
@@ -240,7 +240,7 @@
 
 static void dump_cmd(struct t_cmd * c) {
 	struct fd_list * li;
-	fd_log_debug("  Command %d %s: %s\n", c->code, 
+	fd_log_debug("  Command %d %s: %s", c->code, 
 		c->fmask ? ( c->flags ? "[P=1]" : "[P=0]") : "", c->name);
 	for (li = c->reqrules_fixed.next; li != &c->reqrules_fixed; li = li->next)
 		dump_rule((struct t_rule *)li, "    Request fixed    AVP:");
@@ -324,10 +324,10 @@
 }
 
 static void dump_type(struct t_typedefn * t) {
-	fd_log_debug("  Type %s", (char *)t->name);
-	if (t->parent_name)
-		fd_log_debug("(parent: %s)", (char *)t->parent_name);
-	fd_log_debug("\n");
+	fd_log_debug("  Type %s%s%s%s", (char *)t->name,
+		     t->parent_name ? "(parent: " : "", 
+		     t->parent_name ? (char *)t->parent_name : "", 
+		     t->parent_name ? ")" : "");
 }
 
 static void del_type_contents(struct t_typedefn * t) {
@@ -360,7 +360,7 @@
 }
 
 static void dump_avptype(struct t_avptype * t) {
-	fd_log_debug("    data type: %s\n", t->type_name);
+	fd_log_debug("    data type: %s", t->type_name);
 }
 
 static void del_avptype_contents(struct t_avptype * t) {
@@ -397,7 +397,7 @@
 }
 
 static void dump_enum(struct t_enum * e) {
-	fd_log_debug("    Value: %d == %s\n", e->code, e->name);
+	fd_log_debug("    Value: %d == %s", e->code, e->name);
 }	
 
 static void del_enum_contents(struct t_enum * e) {
@@ -468,12 +468,12 @@
 
 static void dump_avp(struct t_avp * a) {
 	struct fd_list * li;
-	fd_log_debug("  AVP %d %s%s: %s\n", a->code, 
+	fd_log_debug("  AVP %d %s%s: %s", a->code, 
 		a->fmask & AVP_FLAG_MANDATORY ? ( a->flags & AVP_FLAG_MANDATORY ? "[M=1]" : "[M=0]") : "", 
 		a->fmask & AVP_FLAG_VENDOR ? ( a->flags & AVP_FLAG_VENDOR ? "[V=1]" : "[V=0]") : "", 
 		a->name);
 	if (a->fmask & AVP_FLAG_VENDOR)
-		fd_log_debug("    vendor: %d\n", a->vendor);
+		fd_log_debug("    vendor: %d", a->vendor);
 	for (li = a->type.next; li != &a->type; li = li->next)
 		dump_avptype((struct t_avptype *)li);
 	for (li = a->enums.next; li != &a->enums; li = li->next)
@@ -560,7 +560,7 @@
 
 static void dump_appl(struct t_appl * a) {
 	struct fd_list * li;
-	fd_log_debug(" Application %d: %s\n", a->id, a->name);
+	fd_log_debug(" Application %d: %s", a->id, a->name);
 	for (li = a->commands.next; li != &a->commands; li = li->next)
 		dump_cmd((struct t_cmd *)li);
 	for (li = a->types.next; li != &a->types; li = li->next)
@@ -1020,11 +1020,11 @@
 	if (data->cur_app || data->cur_cmd || data->cur_avp) {
 		TRACE_DEBUG(INFO, "Error encountered while parsing tag of:");
 		if (data->cur_app)
-			fd_log_debug("  Application: '%s'\n", data->cur_app->name);
+			fd_log_debug("  Application: '%s'", data->cur_app->name);
 		if (data->cur_cmd)
-			fd_log_debug("  Command    : '%s'\n", data->cur_cmd->name);
+			fd_log_debug("  Command    : '%s'", data->cur_cmd->name);
 		if (data->cur_avp)
-			fd_log_debug("  AVP        : '%s'\n", data->cur_avp->name);
+			fd_log_debug("  AVP        : '%s'", data->cur_avp->name);
 	}
 	return;
 }
--- a/extensions/rt_default/rtd_conf.l	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/rt_default/rtd_conf.l	Thu Mar 14 18:14:35 2013 +0100
@@ -81,7 +81,7 @@
 				ret = sscanf(yytext, "%i", &yylval->integer);
 				if (ret != 1) {
 					/* No matching: an error occurred */
-					fd_log_debug("Unable to convert the value '%s' to a valid number: %s\n", yytext, strerror(errno));
+					fd_log_debug("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? */
 				}
@@ -106,7 +106,7 @@
 				/* Match a quoted string containing a regex */
 				CHECK_MALLOC_DO( yylval->string = strdup(yytext+2), 
 				{
-					TRACE_DEBUG(INFO, "Unable to copy the string '%s': %s\n", yytext, strerror(errno));
+					TRACE_DEBUG(INFO, "Unable to copy the string '%s': %s", yytext, strerror(errno));
 					return LEX_ERROR; /* trig an error in yacc parser */
 				} );
 				yylval->string[strlen(yytext) - 4] = '\0';
@@ -118,7 +118,7 @@
 				/* Match a quoted string. */
 				CHECK_MALLOC_DO( yylval->string = strdup(yytext+1), 
 				{
-					TRACE_DEBUG(INFO, "Unable to copy the string '%s': %s\n", yytext, strerror(errno));
+					TRACE_DEBUG(INFO, "Unable to copy the string '%s': %s", yytext, strerror(errno));
 					return LEX_ERROR; /* trig an error in yacc parser */
 				} );
 				yylval->string[strlen(yytext) - 2] = '\0';
@@ -139,7 +139,7 @@
 
 	/* Unrecognized sequence, if it did not match any previous pattern */
 [^[:space:]\"*:=+;\n]+	{ 
-				fd_log_debug("Unrecognized text on line %d col %d: '%s'.\n", yylloc->first_line, yylloc->first_column, yytext);
+				fd_log_debug("Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext);
 			 	return LEX_ERROR; 
 			}
 
--- a/extensions/rt_default/rtd_conf.y	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/rt_default/rtd_conf.y	Thu Mar 14 18:14:35 2013 +0100
@@ -70,7 +70,7 @@
 	rtd_confin = fopen(conffile, "r");
 	if (rtd_confin == NULL) {
 		ret = errno;
-		fd_log_debug("Unable to open extension configuration file %s for reading: %s\n", conffile, strerror(ret));
+		fd_log_debug("Unable to open extension configuration file %s for reading: %s", conffile, strerror(ret));
 		TRACE_DEBUG (INFO, "Error occurred, message logged -- configuration file.");
 		return ret;
 	}
@@ -98,11 +98,11 @@
 	TRACE_DEBUG(INFO, "Error in configuration parsing");
 	
 	if (ploc->first_line != ploc->last_line)
-		fd_log_debug("%s:%d.%d-%d.%d : %s\n", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);
+		fd_log_debug("%s:%d.%d-%d.%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);
 	else if (ploc->first_column != ploc->last_column)
-		fd_log_debug("%s:%d.%d-%d : %s\n", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s);
+		fd_log_debug("%s:%d.%d-%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s);
 	else
-		fd_log_debug("%s:%d.%d : %s\n", conffile, ploc->first_line, ploc->first_column, s);
+		fd_log_debug("%s:%d.%d : %s", conffile, ploc->first_line, ploc->first_column, s);
 }
 
 %}
--- a/extensions/rt_default/rtd_rules.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/rt_default/rtd_rules.c	Thu Mar 14 18:14:35 2013 +0100
@@ -157,7 +157,7 @@
 /* Debug functions */
 static void dump_rule(int indent, struct rule * rule)
 {
-	fd_log_debug("%*s%s%s%s += %d\n",
+	fd_log_debug("%*s%s%s%s += %d",
 		indent, "",
 		rule->md.is_regex ? "[" : "'",
 		rule->md.plain,
@@ -167,7 +167,7 @@
 static void dump_target(int indent, struct target * target)
 {
 	int i;
-	fd_log_debug("%*s%s%s%s :\n",
+	fd_log_debug("%*s%s%s%s :",
 		indent, "",
 		target->md.is_regex ? "[" : "'",
 		target->md.plain ?: "(empty)",
@@ -175,7 +175,7 @@
 	for (i = 0; i < RTD_CRI_MAX; i++) {
 		if (! FD_IS_LIST_EMPTY(&target->rules[i])) {
 			struct fd_list * li;
-			fd_log_debug("%*s  rules[%d]:\n",
+			fd_log_debug("%*s  rules[%d]:",
 				indent, "", i);
 			for (li = target->rules[i].next; li != &target->rules[i]; li = li->next) {
 				dump_rule(indent + 3, (struct rule *)li);
@@ -593,16 +593,16 @@
 void rtd_dump(void)
 {
 	int i;
-	fd_log_debug("[rt_default] Dumping rules repository...\n");
+	fd_log_debug("[rt_default] Dumping rules repository...");
 	for (i = 0; i < RTD_TAR_MAX; i++) {
 		if (!FD_IS_LIST_EMPTY( &TARGETS[i] )) {
 			struct fd_list * li;
-			fd_log_debug("  Targets list %d:\n", i);
+			fd_log_debug("  Targets list %d:", i);
 			for (li = TARGETS[i].next; li != &TARGETS[i]; li = li->next) {
 				dump_target(4, (struct target *)li);
 			}
 		}
 	}
 	
-	fd_log_debug("[rt_default] End of dump\n");
+	fd_log_debug("[rt_default] End of dump");
 }
--- a/extensions/rt_ereg/rtereg_conf.l	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/rt_ereg/rtereg_conf.l	Thu Mar 14 18:14:35 2013 +0100
@@ -80,7 +80,7 @@
 				/* Match a quoted string. */
 				CHECK_MALLOC_DO( yylval->string = strdup(yytext+1), 
 				{
-					TRACE_DEBUG(INFO, "Unable to copy the string '%s': %s\n", yytext, strerror(errno));
+					TRACE_DEBUG(INFO, "Unable to copy the string '%s': %s", yytext, strerror(errno));
 					return LEX_ERROR; /* trig an error in yacc parser */
 				} );
 				yylval->string[strlen(yytext) - 2] = '\0';
@@ -95,7 +95,7 @@
 				ret = sscanf(yytext, "%i", &yylval->integer);
 				if (ret != 1) {
 					/* No matching: an error occurred */
-					fd_log_debug("Unable to convert the value '%s' to a valid number: %s\n", yytext, strerror(errno));
+					fd_log_debug("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? */
 				}
@@ -112,7 +112,7 @@
 
 	/* Unrecognized sequence, if it did not match any previous pattern */
 [^[:space:]\":=+;\n]+	{ 
-				fd_log_debug("Unrecognized text on line %d col %d: '%s'.\n", yylloc->first_line, yylloc->first_column, yytext);
+				fd_log_debug("Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext);
 			 	return LEX_ERROR; 
 			}
 
--- a/extensions/rt_ereg/rtereg_conf.y	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/rt_ereg/rtereg_conf.y	Thu Mar 14 18:14:35 2013 +0100
@@ -67,7 +67,7 @@
 	rtereg_confin = fopen(conffile, "r");
 	if (rtereg_confin == NULL) {
 		ret = errno;
-		fd_log_debug("Unable to open extension configuration file %s for reading: %s\n", conffile, strerror(ret));
+		fd_log_debug("Unable to open extension configuration file %s for reading: %s", conffile, strerror(ret));
 		TRACE_DEBUG (INFO, "Error occurred, message logged -- configuration file.");
 		return ret;
 	}
@@ -95,11 +95,11 @@
 	TRACE_DEBUG(INFO, "Error in configuration parsing");
 	
 	if (ploc->first_line != ploc->last_line)
-		fd_log_debug("%s:%d.%d-%d.%d : %s\n", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);
+		fd_log_debug("%s:%d.%d-%d.%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);
 	else if (ploc->first_column != ploc->last_column)
-		fd_log_debug("%s:%d.%d-%d : %s\n", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s);
+		fd_log_debug("%s:%d.%d-%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s);
 	else
-		fd_log_debug("%s:%d.%d : %s\n", conffile, ploc->first_line, ploc->first_column, s);
+		fd_log_debug("%s:%d.%d : %s", conffile, ploc->first_line, ploc->first_column, s);
 }
 
 %}
--- a/extensions/test_acct/test_acct.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/test_acct/test_acct.c	Thu Mar 14 18:14:35 2013 +0100
@@ -72,16 +72,16 @@
 		/* Set the Origin-Host, Origin-Realm, Result-Code AVPs */
 		CHECK_FCT( fd_msg_rescode_set( ans, "DIAMETER_SUCCESS", NULL, NULL, 1 ) );
 		
-		fd_log_debug("--------------Received the following Accounting message:--------------\n");
+		fd_log_debug("--------------Received the following Accounting message:--------------");
 		
 		CHECK_FCT( fd_sess_getsid ( sess, &s, &sl ) );
-		fd_log_debug("Session: %.*s\n", (int)sl, s);
+		fd_log_debug("Session: %.*s", (int)sl, s);
 		
 		/* The AVPs that we copy in the answer */
 		CHECK_FCT( fd_msg_search_avp ( qry, tac_dict.Accounting_Record_Type, &a) );
 		if (a) {
 			CHECK_FCT( fd_msg_avp_hdr( a, &h )  );
-			fd_log_debug("Accounting-Record-Type: %d (%s)\n", h->avp_value->u32, 
+			fd_log_debug("Accounting-Record-Type: %d (%s)", h->avp_value->u32, 
 						/* it would be better to search this in the dictionary, but it is only for debug, so ok */
 						(h->avp_value->u32 == 1) ? "EVENT_RECORD" : 
 						(h->avp_value->u32 == 2) ? "START_RECORD" : 
@@ -96,7 +96,7 @@
 		CHECK_FCT( fd_msg_search_avp ( qry, tac_dict.Accounting_Record_Number, &a) );
 		if (a) {
 			CHECK_FCT( fd_msg_avp_hdr( a, &h )  );
-			fd_log_debug("Accounting-Record-Number: %d\n", h->avp_value->u32);
+			fd_log_debug("Accounting-Record-Number: %d", h->avp_value->u32);
 			CHECK_FCT( fd_msg_avp_new ( tac_dict.Accounting_Record_Number, 0, &a ) );
 			CHECK_FCT( fd_msg_avp_setvalue( a, h->avp_value ) );
 			CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, a ) );
@@ -104,7 +104,7 @@
 		
 		/* We may also dump other data from the message, such as Accounting session Id, number of packets, ...  */
 
-		fd_log_debug("----------------------------------------------------------------------\n");
+		fd_log_debug("----------------------------------------------------------------------");
 		
 		/* Send the answer */
 		CHECK_FCT( fd_msg_send( msg, NULL, NULL ) );
--- a/extensions/test_app/ta_bench.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/test_app/ta_bench.c	Thu Mar 14 18:14:35 2013 +0100
@@ -235,25 +235,25 @@
 	CHECK_POSIX_DO( pthread_mutex_unlock(&ta_conf->stats_lock), );
 	
 	/* Now, display the statistics */
-	fd_log_debug( "------- app_test Benchmark result ---------\n");
+	fd_log_debug( "------- app_test Benchmark result ---------");
 	if (now.tv_nsec >= end_time.tv_nsec) {
-		fd_log_debug( " Executing for: %d.%06ld sec\n",
+		fd_log_debug( " Executing for: %d.%06ld sec",
 				(int)(now.tv_sec + ta_conf->bench_duration - end_time.tv_sec),
 				(long)(now.tv_nsec - end_time.tv_nsec) / 1000);
 	} else {
-		fd_log_debug( " Executing for: %d.%06ld sec\n",
+		fd_log_debug( " Executing for: %d.%06ld sec",
 				(int)(now.tv_sec + ta_conf->bench_duration - 1 - end_time.tv_sec),
 				(long)(now.tv_nsec + 1000000000 - end_time.tv_nsec) / 1000);
 	}
-	fd_log_debug( "   %llu messages sent\n", end.nb_sent - start.nb_sent);
-	fd_log_debug( "   %llu error(s) received\n", end.nb_errs - start.nb_errs);
-	fd_log_debug( "   %llu answer(s) received\n", end.nb_recv - start.nb_recv);
-	fd_log_debug( "   Overall:\n");
-	fd_log_debug( "     fastest: %ld.%06ld sec.\n", end.shortest / 1000000, end.shortest % 1000000);
-	fd_log_debug( "     slowest: %ld.%06ld sec.\n", end.longest / 1000000, end.longest % 1000000);
-	fd_log_debug( "     Average: %ld.%06ld sec.\n", end.avg / 1000000, end.avg % 1000000);
-	fd_log_debug( "   Throughput: %llu messages / sec\n", (end.nb_recv - start.nb_recv) / (( now.tv_sec + ta_conf->bench_duration - end_time.tv_sec ) + ((now.tv_nsec - end_time.tv_nsec) / 1000000000)));
-	fd_log_debug( "-------------------------------------\n");
+	fd_log_debug( "   %llu messages sent", end.nb_sent - start.nb_sent);
+	fd_log_debug( "   %llu error(s) received", end.nb_errs - start.nb_errs);
+	fd_log_debug( "   %llu answer(s) received", end.nb_recv - start.nb_recv);
+	fd_log_debug( "   Overall:");
+	fd_log_debug( "     fastest: %ld.%06ld sec.", end.shortest / 1000000, end.shortest % 1000000);
+	fd_log_debug( "     slowest: %ld.%06ld sec.", end.longest / 1000000, end.longest % 1000000);
+	fd_log_debug( "     Average: %ld.%06ld sec.", end.avg / 1000000, end.avg % 1000000);
+	fd_log_debug( "   Throughput: %llu messages / sec", (end.nb_recv - start.nb_recv) / (( now.tv_sec + ta_conf->bench_duration - end_time.tv_sec ) + ((now.tv_nsec - end_time.tv_nsec) / 1000000000)));
+	fd_log_debug( "-------------------------------------");
 
 }
 
--- a/extensions/test_app/ta_conf.l	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/test_app/ta_conf.l	Thu Mar 14 18:14:35 2013 +0100
@@ -80,7 +80,7 @@
 				ret = sscanf(yytext, "%i", &yylval->integer);
 				if (ret != 1) {
 					/* No matching: an error occurred */
-					fd_log_debug("Unable to convert the value '%s' to a valid number: %s\n", yytext, strerror(errno));
+					fd_log_debug("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? */
 				}
@@ -92,7 +92,7 @@
 				/* Match a quoted string. Let's be very permissive. */
 				yylval->string = strdup(yytext+1);
 				if (!yylval->string) {
-					fd_log_debug("Unable to copy the string '%s': %s\n", yytext, strerror(errno));
+					fd_log_debug("Unable to copy the string '%s': %s", yytext, strerror(errno));
 					TRACE_DEBUG(INFO, "strdup failed");
 					return LEX_ERROR; /* trig an error in yacc parser */
 				}
@@ -162,7 +162,7 @@
 
 	/* Unrecognized sequence, if it did not match any previous pattern */
 [^[:space:]"*=>;\n]+	{ 
-				fd_log_debug("Unrecognized text on line %d col %d: '%s'.\n", yylloc->first_line, yylloc->first_column, yytext);
+				fd_log_debug("Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext);
 			 	return LEX_ERROR; 
 			}
 
--- a/extensions/test_app/ta_conf.y	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/test_app/ta_conf.y	Thu Mar 14 18:14:35 2013 +0100
@@ -71,7 +71,7 @@
 	ta_confin = fopen(conffile, "r");
 	if (ta_confin == NULL) {
 		ret = errno;
-		fd_log_debug("Unable to open extension configuration file %s for reading: %s\n", conffile, strerror(ret));
+		fd_log_debug("Unable to open extension configuration file %s for reading: %s", conffile, strerror(ret));
 		TRACE_DEBUG (INFO, "Error occurred, message logged -- configuration file.");
 		return ret;
 	}
@@ -97,11 +97,11 @@
 	TRACE_DEBUG(INFO, "Error in configuration parsing");
 	
 	if (ploc->first_line != ploc->last_line)
-		fd_log_debug("%s:%d.%d-%d.%d : %s\n", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);
+		fd_log_debug("%s:%d.%d-%d.%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);
 	else if (ploc->first_column != ploc->last_column)
-		fd_log_debug("%s:%d.%d-%d : %s\n", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s);
+		fd_log_debug("%s:%d.%d-%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s);
 	else
-		fd_log_debug("%s:%d.%d : %s\n", conffile, ploc->first_line, ploc->first_column, s);
+		fd_log_debug("%s:%d.%d : %s", conffile, ploc->first_line, ploc->first_column, s);
 }
 
 %}
--- a/extensions/test_app/ta_serv.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/test_app/ta_serv.c	Thu Mar 14 18:14:35 2013 +0100
@@ -46,7 +46,7 @@
 	/* This CB should never be called */
 	TRACE_ENTRY("%p %p %p %p", msg, avp, sess, act);
 	
-	fd_log_debug("Unexpected message received!\n");
+	fd_log_debug("Unexpected message received!");
 	
 	return ENOTSUP;
 }
--- a/extensions/test_app/test_app.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/test_app/test_app.c	Thu Mar 14 18:14:35 2013 +0100
@@ -71,16 +71,16 @@
 {
 	if (!TRACE_BOOL(INFO))
 		return;
-	fd_log_debug( "------- app_test configuration dump: ---------\n");
-	fd_log_debug( " Vendor Id .......... : %u\n", ta_conf->vendor_id);
-	fd_log_debug( " Application Id ..... : %u\n", ta_conf->appli_id);
-	fd_log_debug( " Command Id ......... : %u\n", ta_conf->cmd_id);
-	fd_log_debug( " AVP Id ............. : %u\n", ta_conf->avp_id);
-	fd_log_debug( " Mode ............... : %s%s%s\n", ta_conf->mode & MODE_SERV ? "Serv" : "", ta_conf->mode & MODE_CLI ? "Cli" : "",  ta_conf->mode & MODE_BENCH ? " (Benchmark)" : "");
-	fd_log_debug( " Destination Realm .. : %s\n", ta_conf->dest_realm ?: "- none -");
-	fd_log_debug( " Destination Host ... : %s\n", ta_conf->dest_host ?: "- none -");
-	fd_log_debug( " Signal ............. : %i\n", ta_conf->signal);
-	fd_log_debug( "------- /app_test configuration dump ---------\n");
+	fd_log_debug( "------- app_test configuration dump: ---------");
+	fd_log_debug( " Vendor Id .......... : %u", ta_conf->vendor_id);
+	fd_log_debug( " Application Id ..... : %u", ta_conf->appli_id);
+	fd_log_debug( " Command Id ......... : %u", ta_conf->cmd_id);
+	fd_log_debug( " AVP Id ............. : %u", ta_conf->avp_id);
+	fd_log_debug( " Mode ............... : %s%s%s", ta_conf->mode & MODE_SERV ? "Serv" : "", ta_conf->mode & MODE_CLI ? "Cli" : "",  ta_conf->mode & MODE_BENCH ? " (Benchmark)" : "");
+	fd_log_debug( " Destination Realm .. : %s", ta_conf->dest_realm ?: "- none -");
+	fd_log_debug( " Destination Host ... : %s", ta_conf->dest_host ?: "- none -");
+	fd_log_debug( " Signal ............. : %i", ta_conf->signal);
+	fd_log_debug( "------- /app_test configuration dump ---------");
 }
 
 /* Function to display statistics periodically */
@@ -106,30 +106,30 @@
 		CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &now), );
 		
 		/* Now, display everything */
-		fd_log_debug( "------- app_test statistics ---------\n");
+		fd_log_debug( "------- app_test statistics ---------");
 		if (now.tv_nsec >= start.tv_nsec) {
-			fd_log_debug( " Executing for: %d.%06ld sec\n",
+			fd_log_debug( " Executing for: %d.%06ld sec",
 					(int)(now.tv_sec - start.tv_sec),
 					(long)(now.tv_nsec - start.tv_nsec) / 1000);
 		} else {
-			fd_log_debug( " Executing for: %d.%06ld sec\n",
+			fd_log_debug( " Executing for: %d.%06ld sec",
 					(int)(now.tv_sec - 1 - start.tv_sec),
 					(long)(now.tv_nsec + 1000000000 - start.tv_nsec) / 1000);
 		}
 		
 		if (ta_conf->mode & MODE_SERV) {
-			fd_log_debug( " Server: %llu message(s) echoed\n", copy.nb_echoed);
+			fd_log_debug( " Server: %llu message(s) echoed", copy.nb_echoed);
 		}
 		if (ta_conf->mode & MODE_CLI) {
-			fd_log_debug( " Client:\n");
-			fd_log_debug( "   %llu message(s) sent\n", copy.nb_sent);
-			fd_log_debug( "   %llu error(s) received\n", copy.nb_errs);
-			fd_log_debug( "   %llu answer(s) received\n", copy.nb_recv);
-			fd_log_debug( "     fastest: %ld.%06ld sec.\n", copy.shortest / 1000000, copy.shortest % 1000000);
-			fd_log_debug( "     slowest: %ld.%06ld sec.\n", copy.longest / 1000000, copy.longest % 1000000);
-			fd_log_debug( "     Average: %ld.%06ld sec.\n", copy.avg / 1000000, copy.avg % 1000000);
+			fd_log_debug( " Client:");
+			fd_log_debug( "   %llu message(s) sent", copy.nb_sent);
+			fd_log_debug( "   %llu error(s) received", copy.nb_errs);
+			fd_log_debug( "   %llu answer(s) received", copy.nb_recv);
+			fd_log_debug( "     fastest: %ld.%06ld sec.", copy.shortest / 1000000, copy.shortest % 1000000);
+			fd_log_debug( "     slowest: %ld.%06ld sec.", copy.longest / 1000000, copy.longest % 1000000);
+			fd_log_debug( "     Average: %ld.%06ld sec.", copy.avg / 1000000, copy.avg % 1000000);
 		}
-		fd_log_debug( "-------------------------------------\n");
+		fd_log_debug( "-------------------------------------");
 	}
 	
 	return NULL; /* never called */
--- a/extensions/test_netemul/test_netemul.l	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/test_netemul/test_netemul.l	Thu Mar 14 18:14:35 2013 +0100
@@ -77,7 +77,7 @@
 				ret = sscanf(yytext, "%f", &yylval->decimal);
 				if (ret != 1) {
 					/* No matching: an error occurred */
-					fd_log_debug("Unable to convert the value '%s' to a valid float: %s\n", yytext, strerror(errno));
+					fd_log_debug("Unable to convert the value '%s' to a valid float: %s", yytext, strerror(errno));
 					return LEX_ERROR; /* trig an error in yacc parser */
 					/* Maybe we could REJECT instead of failing here? */
 				}
@@ -91,7 +91,7 @@
 				ret = sscanf(yytext, "%lu", &yylval->ulong);
 				if (ret != 1) {
 					/* No matching: an error occurred */
-					fd_log_debug("Unable to convert the value '%s' to a valid long: %s\n", yytext, strerror(errno));
+					fd_log_debug("Unable to convert the value '%s' to a valid long: %s", yytext, strerror(errno));
 					return LEX_ERROR; /* trig an error in yacc parser */
 					/* Maybe we could REJECT instead of failing here? */
 				}
@@ -112,7 +112,7 @@
 
 	/* Unrecognized sequence, if it did not match any previous pattern */
 [^[:space:][:digit:]=;%/\n]+	{ 
-				fd_log_debug("Unrecognized text on line %d col %d: '%s'.\n", yylloc->first_line, yylloc->first_column, yytext);
+				fd_log_debug("Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext);
 			 	return LEX_ERROR; 
 			}
 
--- a/extensions/test_netemul/test_netemul.y	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/test_netemul/test_netemul.y	Thu Mar 14 18:14:35 2013 +0100
@@ -67,7 +67,7 @@
 	test_netemulin = fopen(conffile, "r");
 	if (test_netemulin == NULL) {
 		ret = errno;
-		fd_log_debug("Unable to open extension configuration file %s for reading: %s\n", conffile, strerror(ret));
+		fd_log_debug("Unable to open extension configuration file %s for reading: %s", conffile, strerror(ret));
 		TRACE_DEBUG (INFO, "Error occurred, message logged -- configuration file.");
 		return ret;
 	}
@@ -95,11 +95,11 @@
 	TRACE_DEBUG(INFO, "Error in configuration parsing");
 	
 	if (ploc->first_line != ploc->last_line)
-		fd_log_debug("%s:%d.%d-%d.%d : %s\n", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);
+		fd_log_debug("%s:%d.%d-%d.%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);
 	else if (ploc->first_column != ploc->last_column)
-		fd_log_debug("%s:%d.%d-%d : %s\n", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s);
+		fd_log_debug("%s:%d.%d-%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s);
 	else
-		fd_log_debug("%s:%d.%d : %s\n", conffile, ploc->first_line, ploc->first_column, s);
+		fd_log_debug("%s:%d.%d : %s", conffile, ploc->first_line, ploc->first_column, s);
 }
 
 %}
--- a/extensions/test_sip/test_sip.l	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/test_sip/test_sip.l	Thu Mar 14 18:14:35 2013 +0100
@@ -78,7 +78,7 @@
 				ret = sscanf(yytext, "%i", &yylval->integer);
 				if (ret != 1) {
 					/* No matching: an error occurred */
-					fd_log_debug("Unable to convert the value '%s' to a valid number: %s\n", yytext, strerror(errno));
+					fd_log_debug("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? */
 				}
@@ -90,7 +90,7 @@
 				/* Match a quoted string. Let's be very permissive. */
 				yylval->string = strdup(yytext+1);
 				if (!yylval->string) {
-					fd_log_debug("Unable to copy the string '%s': %s\n", yytext, strerror(errno));
+					fd_log_debug("Unable to copy the string '%s': %s", yytext, strerror(errno));
 					TRACE_DEBUG(INFO, "strdup failed");
 					return LEX_ERROR; /* trig an error in yacc parser */
 				}
@@ -130,7 +130,7 @@
 
 	/* Unrecognized sequence, if it did not match any previous pattern */
 [^[:space:]"*=>;\n]+	{ 
-				fd_log_debug("Unrecognized text on line %d col %d: '%s'.\n", yylloc->first_line, yylloc->first_column, yytext);
+				fd_log_debug("Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext);
 			 	return LEX_ERROR; 
 			}
 
--- a/extensions/test_sip/test_sip.y	Thu Mar 14 17:31:16 2013 +0100
+++ b/extensions/test_sip/test_sip.y	Thu Mar 14 18:14:35 2013 +0100
@@ -69,7 +69,7 @@
 	test_sipin = fopen(conffile, "r");
 	if (test_sipin == NULL) {
 		ret = errno;
-		fd_log_debug("Unable to open extension configuration file %s for reading: %s\n", conffile, strerror(ret));
+		fd_log_debug("Unable to open extension configuration file %s for reading: %s", conffile, strerror(ret));
 		TRACE_DEBUG (INFO, "Error occurred, message logged -- configuration file.");
 		return ret;
 	}
@@ -95,11 +95,11 @@
 	TRACE_DEBUG(INFO, "Error in configuration parsing");
 	
 	if (ploc->first_line != ploc->last_line)
-		fd_log_debug("%s:%d.%d-%d.%d : %s\n", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);
+		fd_log_debug("%s:%d.%d-%d.%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);
 	else if (ploc->first_column != ploc->last_column)
-		fd_log_debug("%s:%d.%d-%d : %s\n", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s);
+		fd_log_debug("%s:%d.%d-%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s);
 	else
-		fd_log_debug("%s:%d.%d : %s\n", conffile, ploc->first_line, ploc->first_column, s);
+		fd_log_debug("%s:%d.%d : %s", conffile, ploc->first_line, ploc->first_column, s);
 }
 
 %}
--- a/libfdcore/cnxctx.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/libfdcore/cnxctx.c	Thu Mar 14 18:14:35 2013 +0100
@@ -230,7 +230,7 @@
 	if (TRACE_BOOL(INFO)) {
 		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);
 	}
 	
 	CHECK_MALLOC_DO( cli = fd_cnx_init(1), { shutdown(cli_sock, SHUT_RDWR); close(cli_sock); return NULL; } );
@@ -313,7 +313,7 @@
 	if (TRACE_BOOL(INFO)) {
 		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);
 	}
 	
 	/* Once the socket is created successfuly, prepare the remaining of the cnx */
@@ -405,7 +405,7 @@
 	if (TRACE_BOOL(INFO)) {
 		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);
 	}
 	
 	/* Generate the names for the object */
@@ -856,7 +856,7 @@
 						CHECK_GNUTLS_DO( ret = gnutls_handshake(session),
 							{
 								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;
 							} );
@@ -901,7 +901,7 @@
 						CHECK_GNUTLS_DO( ret = gnutls_handshake(session),
 							{
 								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;
 							} );
@@ -1037,7 +1037,7 @@
 	if (priority) {
 		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 );
 	}
@@ -1074,12 +1074,12 @@
 		gnutls_kx_algorithm_t kx;
   		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
 		* to the appropriate. */
@@ -1087,81 +1087,81 @@
 		switch (cred)
 		{
 			case GNUTLS_CRD_IA:
-				fd_log_debug("\t - TLS/IA session\n");
+				fd_log_debug("\t - TLS/IA session");
 				break;
 
 			case GNUTLS_CRD_PSK:
 				/* 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;
 
 			case GNUTLS_CRD_CERTIFICATE:	/* certificate authentication */
 				/* 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));
 				}
 				break;
 #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;
 #endif /* ENABLE_SRP */
 
 			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;
 
 		}
 
 		/* 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);
 	}
 	
 	/* First, use built-in verification */
 	CHECK_GNUTLS_DO( gnutls_certificate_verify_peers2 (session, &gtret), return EINVAL );
 	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;
 	}
@@ -1183,14 +1183,14 @@
 		unsigned int algo, bits;
 		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++)
 		{
 
 			CHECK_GNUTLS_DO( gnutls_x509_crt_init (&cert), return EINVAL);
 			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) );
 			GNUTLS_TRACE( activation_time = gnutls_x509_crt_get_activation_time (cert) );
@@ -1202,31 +1202,32 @@
 			size = sizeof (serial);
 			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(buf);
 			}
-			fd_log_debug("\n");
 
 			/* 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) );
 		}
@@ -1243,8 +1244,8 @@
 		GNUTLS_TRACE( deadline = gnutls_x509_crt_get_expiration_time(cert) );
 		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;
 		}
@@ -1252,8 +1253,8 @@
 		GNUTLS_TRACE( deadline = gnutls_x509_crt_get_activation_time(cert) );
 		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;
 		}
@@ -1261,8 +1262,8 @@
 		if ((i == 0) && (conn->cc_tls_para.cn)) {
 			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;
 			}
@@ -1301,13 +1302,13 @@
 
 		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
 		*/
 		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
 		* to the appropriate.
@@ -1316,13 +1317,13 @@
 		switch (cred)
 		{
 			case GNUTLS_CRD_IA:
-				fd_log_debug("\t - TLS/IA session\n");
+				fd_log_debug("\t - TLS/IA session");
 				break;
 
 
 			#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;
 			#endif
@@ -1331,12 +1332,12 @@
 				/* 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));
 
 				if (kx == GNUTLS_KX_ECDHE_PSK)
@@ -1346,7 +1347,7 @@
 				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));
 				if (kx == GNUTLS_KX_ANON_ECDH)
 					ecdh = 1;
@@ -1369,7 +1370,7 @@
 
 					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)
 					{
@@ -1381,7 +1382,7 @@
 
 						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
 						 a certificate. */
@@ -1389,14 +1390,14 @@
 						ret = gnutls_x509_crt_print (cert, GNUTLS_CRT_PRINT_ONELINE, &cinfo);
 						if (ret == 0)
 						{
-						  fd_log_debug("\t\t%s\n", cinfo.data);
+						  fd_log_debug("\t\t%s", cinfo.data);
 						  gnutls_free (cinfo.data);
 						}
 						
 						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;
 							}
@@ -1414,39 +1415,39 @@
 		}                           /* switch */
 
 		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));
 
 		/* 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);
 	
 	}
 
@@ -1455,18 +1456,18 @@
 	*/
 	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)
 	{
@@ -1479,7 +1480,7 @@
 	*/
 	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;
 		}
 
@@ -1492,8 +1493,8 @@
 
 		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);
 			return GNUTLS_E_CERTIFICATE_ERROR;
@@ -1572,7 +1573,7 @@
 		CHECK_GNUTLS_DO( ret = gnutls_handshake(conn->cc_tls_para.session),
 			{
 				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);
 				return EINVAL;
--- a/libfdcore/config.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/libfdcore/config.c	Thu Mar 14 18:14:35 2013 +0100
@@ -85,32 +85,32 @@
 	if (!TRACE_BOOL(INFO))
 		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;
 		fd_log_debug("  Local applications ..... : ");
 		while (li != &fd_g_config->cnf_apps) {
 			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" : "--",
 					app->flags.acct ? "Ac" : "--",
@@ -119,29 +119,29 @@
 		}
 	}
 	
-	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("          - 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\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("  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("          - DH bits ...... : %d", 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("  Origin-State-Id ........ : %u", fd_g_config->cnf_orstateid);
 }
 
 /* read contents of a file opened in "rb" mode and alloc this data into a gnutls_datum_t (must be freed afterwards) */
@@ -171,7 +171,7 @@
 
 		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; 
 		}
 	} while (!feof(pemfile));
@@ -200,15 +200,15 @@
   name_size = sizeof (name);
   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)
     {
       issuer_name_size = sizeof (issuer_name);
       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);
     }
 
   if (crl != NULL)
@@ -216,10 +216,10 @@
       issuer_name_size = sizeof (issuer_name);
       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;
 }
@@ -247,7 +247,7 @@
 	}
 	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;
 	}
@@ -348,7 +348,7 @@
 				if (TRACE_BOOL(INFO)) {
 					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);
 			}
@@ -379,7 +379,7 @@
 		FILE *stream = fopen (fd_g_config->cnf_sec_data.cert_file, "rb");
 		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; 
 		}
 		CHECK_FCT( fd_conf_stream_to_gnutls_datum(stream, &certfile) );
@@ -440,22 +440,22 @@
 			
 			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;
 			}
 			
 			/* Now check the subject matches our hostname */
 			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;
 			}
 			
@@ -483,24 +483,24 @@
 				} );
 				
 			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;
 			}
 
 			/* 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;
 			}
 
@@ -512,15 +512,15 @@
 
 				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;
 				}
 
 				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;
 				}
 			}
@@ -550,7 +550,7 @@
 		FILE *stream = fopen (fd_g_config->cnf_sec_data.dh_file, "rb");
 		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; 
 		}
 		do {
@@ -572,7 +572,7 @@
 			
 			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; 
 			}
 		} while (!feof(stream));
--- a/libfdcore/core.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/libfdcore/core.c	Thu Mar 14 18:14:35 2013 +0100
@@ -130,7 +130,7 @@
 				goto end;
 			
 			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);
 		}
 	}
 	
@@ -153,7 +153,7 @@
 	
 	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();
 	
--- a/libfdcore/endpoints.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/libfdcore/endpoints.c	Thu Mar 14 18:14:35 2013 +0100
@@ -63,7 +63,7 @@
 		TRACE_DEBUG(ANNOYING, "  DEBUG:fd_ep_add_merge  Current list:");
 		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" : "-",
 				(flags & EP_FL_ADV)	    ? "A" : "-",
--- a/libfdcore/events.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/libfdcore/events.c	Thu Mar 14 18:14:35 2013 +0100
@@ -177,7 +177,7 @@
 	
 	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);
 	}
 	
 	CHECK_POSIX_DO( pthread_rwlock_unlock(&trig_rwl),  );
--- a/libfdcore/extensions.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/libfdcore/extensions.c	Thu Mar 14 18:14:35 2013 +0100
@@ -81,12 +81,12 @@
 {
 	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 ");
 	}
 }
 
@@ -125,7 +125,7 @@
 		
 		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;
 		}
@@ -161,12 +161,12 @@
 #endif /* DEBUG */
 		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!)");
 				}
 			}
 			#endif /* DEBUG */
@@ -181,7 +181,7 @@
 		
 		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;
 		}
 		
@@ -200,7 +200,7 @@
 		ret = (*fd_ext_init)( FD_PROJECT_VERSION_MAJOR, FD_PROJECT_VERSION_MINOR, ext->conffile );
 		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;
 		}
 		
@@ -238,7 +238,7 @@
 		if (ext->handler) {
 			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());
 			}
 		}
 #endif /* SKIP_DLCLOSE */
--- a/libfdcore/fdd.l	Thu Mar 14 17:31:16 2013 +0100
+++ b/libfdcore/fdd.l	Thu Mar 14 18:14:35 2013 +0100
@@ -83,7 +83,7 @@
 
 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;
 }
 
@@ -118,14 +118,14 @@
 			char * buf = strdup(yytext+1);
 			if (buf[yyleng-2] != '"')
 			{
-				TRACE_ERROR("Unterminated string: %s\n", yytext);
+				TRACE_ERROR("Unterminated string: %s", yytext);
 				return LEX_ERROR;
 			}
 			buf[yyleng-2] = '\0';
 
 			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;
 			}
 
@@ -134,12 +134,12 @@
 
 			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;
 			}
 			if (globerror == GLOB_NOMATCH)
@@ -149,7 +149,7 @@
 			}
 			if (globerror)
 			{
-				TRACE_ERROR("Unexpected error in glob (%d).\n", globerror);
+				TRACE_ERROR("Unexpected error in glob (%d).", globerror);
 				return LEX_ERROR;
 			}
 
@@ -233,7 +233,7 @@
 				int ret = sscanf(yytext, "%i", &yylval->integer);
 				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? */
 				}
@@ -276,7 +276,7 @@
 <*>[[:alnum:]]+		|	/* This rule is only useful to print a complete token in error messages */
 	/* 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; 
 			}
 
--- a/libfdcore/fdd.y	Thu Mar 14 17:31:16 2013 +0100
+++ b/libfdcore/fdd.y	Thu Mar 14 18:14:35 2013 +0100
@@ -62,11 +62,11 @@
 void yyerror (YYLTYPE *ploc, struct fd_config * conf, char const *s)
 {
 	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);
 	}
 }
 
@@ -503,7 +503,7 @@
 				fd = fopen($3, "r");
 				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;
 				}
@@ -511,7 +511,7 @@
 				fd = fopen($5, "r");
 				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;
 				}
@@ -534,7 +534,7 @@
 				fd = fopen($3, "rb");
 				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;
 				}
@@ -574,7 +574,7 @@
 				fd = fopen($3, "rb");
 				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;
 				}
@@ -617,7 +617,7 @@
 							conf->cnf_sec_data.prio_string,
 							&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; } );
 			}
 			;
@@ -634,7 +634,7 @@
 				fd = fopen($3, "r");
 				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;
 				}
--- a/libfdcore/p_ce.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/libfdcore/p_ce.c	Thu Mar 14 18:14:35 2013 +0100
@@ -305,7 +305,7 @@
 				/* We check that the value matches what we know, otherwise disconnect the peer */
 				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";
 					error->pei_message = "Your Origin-Host value does not match my configuration.";
@@ -777,7 +777,7 @@
 			CHECK_FCT_DO( fd_cnx_handshake(peer->p_cnxctx, GNUTLS_CLIENT, peer->p_hdr.info.config.pic_priority, NULL),
 				{
 					/* 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;
 				} );
 
@@ -830,7 +830,7 @@
 	if (peer->p_hdr.info.config.pic_realm) {
 		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;
 		}
@@ -845,7 +845,7 @@
 	if (peer->p_flags.pf_responder) {
 		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;
 		}
@@ -930,7 +930,7 @@
 		CHECK_FCT_DO( fd_cnx_handshake(peer->p_cnxctx, GNUTLS_SERVER, peer->p_hdr.info.config.pic_priority, NULL),
 			{
 				/* 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;
 			} );
 		
--- a/libfdcore/p_cnx.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/libfdcore/p_cnx.c	Thu Mar 14 18:14:35 2013 +0100
@@ -89,7 +89,7 @@
 		hints.ai_flags = AI_ADDRCONFIG;
 		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 );
 			return 0;
@@ -125,7 +125,7 @@
 	
 	/* 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 );
 		return 0;
@@ -278,7 +278,7 @@
 		CHECK_FCT_DO( fd_cnx_handshake(cnx, GNUTLS_CLIENT, peer->p_hdr.info.config.pic_priority, NULL),
 			{
 				/* 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);
 				fd_ep_filter(&peer->p_hdr.info.pi_endpoints, EP_FL_CONF);
--- a/libfdcore/p_dp.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/libfdcore/p_dp.c	Thu Mar 14 18:14:35 2013 +0100
@@ -96,12 +96,12 @@
 				CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_ENUMVAL, ENUMVAL_BY_STRUCT, &er, &dictobj, 0 )  );
 				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);
 			}
 		}
 		
--- a/libfdcore/p_dw.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/libfdcore/p_dw.c	Thu Mar 14 18:14:35 2013 +0100
@@ -61,7 +61,7 @@
 		}
 
 		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,
 				hdr->avp_value->u32 );
--- a/libfdcore/p_psm.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/libfdcore/p_psm.c	Thu Mar 14 18:14:35 2013 +0100
@@ -485,7 +485,7 @@
 		/* Parse the received buffer */
 		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 );
 				goto psm_loop;
--- a/libfdcore/p_sr.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/libfdcore/p_sr.c	Thu Mar 14 18:14:35 2013 +0100
@@ -68,7 +68,7 @@
 	if (!TRACE_BOOL(ANNOYING))
 		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), );
 	
@@ -76,7 +76,7 @@
 		struct sentreq * sr = (struct sentreq *)li;
 		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);
 		
--- a/libfdcore/peers.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/libfdcore/peers.c	Thu Mar 14 18:14:35 2013 +0100
@@ -404,22 +404,23 @@
 /* Dump info of one peer */
 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);
+			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("\n");
+	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."),
 				peer->p_hdr.info.config.pic_flags.pro4 == PI_P4_DEFAULT ? "" :
@@ -430,7 +431,7 @@
 				peer->p_hdr.info.config.pic_flags.exp ? "Expire." : "",
 				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);
 	}
 }
 
@@ -439,7 +440,7 @@
 {
 	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 */ );
 	
 	for (li = fd_g_peers.next; li != &fd_g_peers; li = li->next) {
--- a/libfdcore/routing_dispatch.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/libfdcore/routing_dispatch.c	Thu Mar 14 18:14:35 2013 +0100
@@ -564,7 +564,7 @@
 
 		/* 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) );
 			return 0;
--- a/libfdcore/sctp.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/libfdcore/sctp.c	Thu Mar 14 18:14:35 2013 +0100
@@ -87,9 +87,9 @@
 				TRACE_DEBUG(INFO, "Invalid size of socket option: %d / %d", sz, (socklen_t)sizeof(rtoinfo));
 				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);
 		}
 
 		/* rtoinfo.srto_initial: Estimate of the RTT before it can be measured; keep the default value */
@@ -102,9 +102,9 @@
 		if (TRACE_BOOL(SCTP_LEVEL)) {
 			/* 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);
 		}
 	}
 	#else /* SCTP_RTOINFO */
@@ -126,11 +126,11 @@
 				TRACE_DEBUG(INFO, "Invalid size of socket option: %d / %d", sz, (socklen_t)sizeof(assoc));
 				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);
 		}
 
 		assoc.sasoc_asocmaxrxt = 4;	/* Maximum number of retransmission attempts: we want fast detection of errors */
@@ -142,11 +142,11 @@
 		if (TRACE_BOOL(SCTP_LEVEL)) {
 			/* 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);
 		}
 	}
 	#else /* SCTP_ASSOCINFO */
@@ -170,10 +170,10 @@
 				TRACE_DEBUG(INFO, "Invalid size of socket option: %d / %d", sz, (socklen_t)sizeof(init));
 				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);
 		}
 
 		/* Set the init options -- need to receive SCTP_COMM_UP to confirm the requested parameters, but we don't care (best effort) */
@@ -186,10 +186,10 @@
 		if (TRACE_BOOL(SCTP_LEVEL)) {
 			/* 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);
 		}
 	}
 	#else /* SCTP_INITMSG */
@@ -211,8 +211,8 @@
 				TRACE_DEBUG(INFO, "Invalid size of socket option: %d / %d", sz, (socklen_t)sizeof(linger));
 				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);
 		}
 		
 		linger.l_onoff	= 0;	/* Do not activate the linger */
@@ -224,8 +224,8 @@
 		if (TRACE_BOOL(SCTP_LEVEL)) {
 			/* 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);
 		}
 	}
 	#else /* SO_LINGER */
@@ -246,7 +246,7 @@
 				TRACE_DEBUG(INFO, "Invalid size of socket option: %d / %d", sz, (socklen_t)sizeof(nodelay));
 				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");
 		}
 
 		nodelay = 1;	/* We turn ON the Nagle algorithm (probably the default already), since we might have several messages to send through the same proxy (not the same session). */
@@ -257,7 +257,7 @@
 		if (TRACE_BOOL(SCTP_LEVEL)) {
 			/* 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");
 		}
 	}
 	#else /* SCTP_NODELAY */
@@ -286,7 +286,7 @@
 				TRACE_DEBUG(INFO, "Invalid size of socket option: %d / %d", sz, (socklen_t)sizeof(nofrag));
 				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");
 		}
 
 		nofrag = 0;	/* We turn ON the fragmentation, since Diameter messages & TLS messages can be quite large. */
@@ -297,7 +297,7 @@
 		if (TRACE_BOOL(SCTP_LEVEL)) {
 			/* 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");
 		}
 	}
 	#else /* SCTP_DISABLE_FRAGMENTS */
@@ -323,12 +323,12 @@
 				TRACE_DEBUG(INFO, "Invalid size of socket option: %d / %d", sz, (socklen_t)sizeof(parms));
 				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);
 		}
 
 		parms.spp_flags = SPP_HB_ENABLE;	/* Enable heartbeat for the association */
@@ -347,12 +347,12 @@
 		if (TRACE_BOOL(SCTP_LEVEL)) {
 			/* 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);
 		}
 	}
 	#else /* SCTP_PEER_ADDR_PARAMS */
@@ -391,15 +391,15 @@
 				return ENOTSUP;
 			}
 
-			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);
 		}
 	}
 	#else /* SCTP_EVENTS */
@@ -420,7 +420,7 @@
 				TRACE_DEBUG(INFO, "Invalid size of socket option: %d / %d", sz, (socklen_t)sizeof(v4mapped));
 				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");
 		}
 
 		#ifndef SCTP_USE_MAPPED_ADDRESSES
@@ -435,7 +435,7 @@
 		if (TRACE_BOOL(SCTP_LEVEL)) {
 			/* 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 {
 		TRACE_DEBUG(SCTP_LEVEL, "Skipping SCTP_I_WANT_MAPPED_V4_ADDR, since IPv6 disabled.");
@@ -466,7 +466,7 @@
 				TRACE_DEBUG(INFO, "Invalid size of socket option: %d / %d", sz, (socklen_t)sizeof(interleave));
 				return ENOTSUP;
 			}
-			fd_log_debug( "Def SCTP_FRAGMENT_INTERLEAVE value : %d\n", interleave);
+			fd_log_debug( "Def SCTP_FRAGMENT_INTERLEAVE value : %d", interleave);
 		}
 
 		#if 0
@@ -481,7 +481,7 @@
 		if (TRACE_BOOL(SCTP_LEVEL)) {
 			/* 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);
 		}
 	}
 	#else /* SCTP_FRAGMENT_INTERLEAVE */
@@ -512,7 +512,7 @@
 				TRACE_DEBUG(INFO, "Invalid size of socket option: %d / %d", sz, (socklen_t)sizeof(bool));
 				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");
 		}
 
 		bool = 0;
@@ -523,7 +523,7 @@
 		if (TRACE_BOOL(SCTP_LEVEL)) {
 			/* 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");
 		}
 	}
 	#else /* SCTP_EXPLICIT_EOR */
@@ -570,7 +570,7 @@
 				TRACE_DEBUG(INFO, "Invalid size of socket option: %d / %d", sz, (socklen_t)sizeof(asconf));
 				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");
 		}
 
 		asconf = 1;	/* allow automatic use of added or removed addresses in the association (for bound-all sockets) */
@@ -582,7 +582,7 @@
 			socklen_t sz = sizeof(asconf);
 			/* 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");
 		}
 	}
 	#else /* SCTP_AUTO_ASCONF */
@@ -745,7 +745,7 @@
 			} ptr;
 			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, "" );
 				ptr.buf += (ptr.sa->sa_family == AF_INET) ? sizeof(sSA4) : sizeof(sSA6) ;
@@ -773,7 +773,7 @@
 		
 		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, "" );
 		}
@@ -910,19 +910,19 @@
 	if (TRACE_BOOL(SCTP_LEVEL)) {
 		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);
 	}
 	
 	*in = status.sstat_instrms;
@@ -1218,16 +1218,16 @@
 			
 			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);
 			}
 
 			*strid = sndrcv->sinfo_stream;
--- a/libfdcore/sctps.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/libfdcore/sctps.c	Thu Mar 14 18:14:35 2013 +0100
@@ -485,9 +485,9 @@
 	#endif /* GNUTLS_VERSION_300 */
 	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));
 		}
 	}
 			
--- a/libfdcore/server.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/libfdcore/server.c	Thu Mar 14 18:14:35 2013 +0100
@@ -97,11 +97,11 @@
 {
 	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 ),
 				s->secur ? "Secur" : "NotSecur",
@@ -114,7 +114,7 @@
 		for (cli = s->clients.next; cli != &s->clients; cli = cli->next) {
 			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)));
 		}
@@ -147,7 +147,7 @@
 		int ret = fd_cnx_handshake(c->conn, GNUTLS_SERVER, NULL, NULL);
 		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;
 		}
@@ -176,7 +176,7 @@
 	/* Now check we received a CER */
 	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 */
 	pthread_cleanup_push((void *)fd_cnx_destroy, c->conn);
@@ -386,14 +386,14 @@
 	if (empty_conf_ep) {
 		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");
 			return EINVAL;
 		}
 	}
 	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 );
 	}
 	return 0;
--- a/libfdproto/dictionary.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/libfdproto/dictionary.c	Thu Mar 14 18:14:35 2013 +0100
@@ -314,7 +314,7 @@
 			&& (obj->typeyec == dict_obj_info[obj->type].eyecatcher),
 		{
 			if (obj) {
-				TRACE_DEBUG(FULL, "Invalid object : %p\n"
+				TRACE_DEBUG(FULL, "Invalid object : %p"
 						  "     obj->objeyec : %x / %x\n"
 						  "     obj->type    : %d\n"
 						  "     obj->objeyec : %x / %x\n"
@@ -1281,7 +1281,7 @@
 		int i;
 		for (i=0; i<NB_LISTS_PER_OBJ; i++) {
 			if ((obj->list[i].o == NULL) && (obj->list[i].next != &obj->list[i])) {
-				fd_log_debug("%*s>%p: list[%d]:\n", indent, "", obj, i);
+				fd_log_debug("%*s>%p: list[%d]:", indent, "", obj, i);
 				dump_list(&obj->list[i], parents, depth - 1, indent + 2);
 			}
 		}
@@ -1290,7 +1290,7 @@
 
 void fd_dict_dump_object(struct dict_object * obj)
 {
-	fd_log_debug("Dictionary object %p dump:\n", obj);
+	fd_log_debug("Dictionary object %p dump:", obj);
 	dump_object( obj, 1, 2, 2 );
 }
 
@@ -1303,37 +1303,37 @@
 	
 	CHECK_POSIX_DO(  pthread_rwlock_rdlock( &dict->dict_lock ), /* ignore */  );
 	
-	fd_log_debug("######################################################\n");
-	fd_log_debug("###### Dumping vendors, AVPs and related rules #######\n");
+	fd_log_debug("######################################################");
+	fd_log_debug("###### Dumping vendors, AVPs and related rules #######");
 	
 	dump_object( &dict->dict_vendors, 0, 3, 0 );
 	for (li = dict->dict_vendors.list[0].next; li != &dict->dict_vendors.list[0]; li = li->next)
 		dump_object( li->o, 0, 3, 0 );
 	
-	fd_log_debug("######          Dumping applications           #######\n");
+	fd_log_debug("######          Dumping applications           #######");
 
 	dump_object( &dict->dict_applications, 0, 1, 0 );
 	for (li = dict->dict_applications.list[0].next; li != &dict->dict_applications.list[0]; li = li->next)
 		dump_object( li->o, 0, 1, 0 );
 	
-	fd_log_debug("######             Dumping types               #######\n");
+	fd_log_debug("######             Dumping types               #######");
 
 	dump_list( &dict->dict_types, 0, 2, 0 );
 	
-	fd_log_debug("######      Dumping commands per name          #######\n");
+	fd_log_debug("######      Dumping commands per name          #######");
 
 	dump_list( &dict->dict_cmd_name, 0, 2, 0 );
 	
-	fd_log_debug("######   Dumping commands per code and flags   #######\n");
+	fd_log_debug("######   Dumping commands per code and flags   #######");
 
 	dump_list( &dict->dict_cmd_code, 0, 0, 0 );
 	
-	fd_log_debug("######             Statistics                  #######\n");
+	fd_log_debug("######             Statistics                  #######");
 
 	for (i=1; i<=DICT_TYPE_MAX; i++)
-		fd_log_debug(" %5d objects of type %s\n", dict->dict_count[i], dict_obj_info[i].name);
+		fd_log_debug(" %5d objects of type %s", dict->dict_count[i], dict_obj_info[i].name);
 	
-	fd_log_debug("######################################################\n");
+	fd_log_debug("######################################################");
 	
 	/* Free the rwlock */
 	CHECK_POSIX_DO(  pthread_rwlock_unlock( &dict->dict_lock ), /* ignore */  );
@@ -1866,9 +1866,9 @@
 		if (ret) {
 			TRACE_DEBUG(INFO, "An existing object with different non-key data was found: EEXIST");
 			if (TRACE_BOOL(INFO)) {
-				fd_log_debug("New object to insert:\n");
+				fd_log_debug("New object to insert:");
 				dump_object(new, 0, 0, 3);
-				fd_log_debug("Object already in dictionary:\n");			
+				fd_log_debug("Object already in dictionary:");			
 				dump_object(locref, 0, 0 , 3);
 			}
 		} else {
--- a/libfdproto/fifo.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/libfdproto/fifo.c	Thu Mar 14 18:14:35 2013 +0100
@@ -114,18 +114,18 @@
 	if (!TRACE_BOOL(level))
 		return;
 	
-	fd_log_debug("Dumping queue '%s' (%p):\n", name ?: "?", queue);
+	fd_log_debug("Dumping queue '%s' (%p):", name ?: "?", queue);
 	if (!CHECK_FIFO( queue )) {
-		fd_log_debug("  Queue invalid!\n");
+		fd_log_debug("  Queue invalid!");
 		if (queue)
-			fd_log_debug("  (%x != %x)\n", queue->eyec, FIFO_EYEC);
+			fd_log_debug("  (%x != %x)", queue->eyec, FIFO_EYEC);
 		return;
 	}
 	
 	CHECK_POSIX_DO(  pthread_mutex_lock( &queue->mtx ), /* continue */  );
-	fd_log_debug("   %d elements in queue / %d threads waiting\n", queue->count, queue->thrs);
-	fd_log_debug("   %d elements max / %d threads waiting to push\n", queue->max, queue->thrs_push);
-	fd_log_debug("   thresholds: %d / %d (h:%d), cb: %p,%p (%p), highest: %d\n",
+	fd_log_debug("   %d elements in queue / %d threads waiting", queue->count, queue->thrs);
+	fd_log_debug("   %d elements max / %d threads waiting to push", queue->max, queue->thrs_push);
+	fd_log_debug("   thresholds: %d / %d (h:%d), cb: %p,%p (%p), highest: %d",
 			queue->high, queue->low, queue->highest, 
 			queue->h_cb, queue->l_cb, queue->data,
 			queue->highest_ever);
@@ -134,7 +134,7 @@
 		struct fd_list * li;
 		int i = 0;
 		for (li = queue->list.next; li != &queue->list; li = li->next) {
-			fd_log_debug("  [%i] item %p in fifo %p:\n", i++, li->o, queue);
+			fd_log_debug("  [%i] item %p in fifo %p:", i++, li->o, queue);
 			(*dump_item)(level, li->o);
 		}
 	}
--- a/libfdproto/init.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/libfdproto/init.c	Thu Mar 14 18:14:35 2013 +0100
@@ -39,7 +39,7 @@
 static void freelogstr(void * str) {
 	if (TRACE_BOOL(ANNOYING)) {
 		if (str) {
-			fd_log_debug("(Thread '%s' terminating)\n", (char *)str);
+			fd_log_debug("(Thread '%s' terminating)", (char *)str);
 		}
 	}
 	free(str);
--- a/libfdproto/log.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/libfdproto/log.c	Thu Mar 14 18:14:35 2013 +0100
@@ -165,9 +165,9 @@
 	val = pthread_getspecific(fd_log_thname);
 	if (TRACE_BOOL(ANNOYING)) {
 		if (val) {
-			fd_log_debug("(Thread '%s' renamed to '%s')\n", (char *)val, name?:"(nil)");
+			fd_log_debug("(Thread '%s' renamed to '%s')", (char *)val, name?:"(nil)");
 		} else {
-			fd_log_debug("(Thread %p named '%s')\n", pthread_self(), name?:"(nil)");
+			fd_log_debug("(Thread %p named '%s')", pthread_self(), name?:"(nil)");
 		}
 	}
 	if (val != NULL) {
--- a/libfdproto/messages.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/libfdproto/messages.c	Thu Mar 14 18:14:35 2013 +0100
@@ -828,10 +828,10 @@
 	int indent = 2;
 	char *outstr;
 	size_t offset, outlen;
-	CHECK_FCT_DO( dump_init_str(&outstr, &offset, &outlen), { fd_log_debug_fstr(fstr, "Error initializing string for dumping %p\n", msg); return; } );
+	CHECK_FCT_DO( dump_init_str(&outstr, &offset, &outlen), { fd_log_debug_fstr(fstr, "Error initializing string for dumping %p", msg); return; } );
 	do {
 		CHECK_FCT_DO(  msg_dump_intern ( NONE, ref, indent, &outstr, &offset, &outlen ),
-				fd_log_debug_fstr(fstr, "Error while dumping %p\n", ref) );
+				fd_log_debug_fstr(fstr, "Error while dumping %p", ref) );
 		
 		/* Now find the next object */
 		CHECK_FCT_DO(  fd_msg_browse ( ref, MSG_BRW_WALK, &ref, &indent ), break  );
@@ -840,7 +840,7 @@
 	} while (ref);
 	
 	/* now really output this in one shot, so it is not interrupted */
-	fd_log_debug_fstr(fstr, "%s\n", outstr);
+	fd_log_debug_fstr(fstr, "%s", outstr);
 	
 	free(outstr);
 }
@@ -848,11 +848,11 @@
 {
 	char *outstr;
 	size_t offset, outlen;
-	CHECK_FCT_DO( dump_init_str(&outstr, &offset, &outlen), { fd_log_debug_fstr(fstr, "Error initializing string for dumping %p\n", msg); return; } );
+	CHECK_FCT_DO( dump_init_str(&outstr, &offset, &outlen), { fd_log_debug_fstr(fstr, "Error initializing string for dumping %p", msg); return; } );
 	CHECK_FCT_DO(  msg_dump_intern ( NONE, msg, 2, &outstr, &offset, &outlen ),
-				fd_log_debug_fstr(fstr, "Error while dumping %p\n", msg) );
+				fd_log_debug_fstr(fstr, "Error while dumping %p", msg) );
 	/* now really output this in one shot, so it is not interrupted */
-	fd_log_debug_fstr(fstr, "%s\n", outstr);
+	fd_log_debug_fstr(fstr, "%s", outstr);
 	
 	free(outstr);
 }
@@ -865,11 +865,11 @@
 	char *outstr;
 	size_t offset, outlen;
 	CHECK_FCT_DO( dump_init_str(&outstr, &offset, &outlen), 
-			{ fd_log_debug_fstr(fd_g_debug_fstr, "Error initializing string for dumping %p\n", obj); return; } );
+			{ fd_log_debug_fstr(fd_g_debug_fstr, "Error initializing string for dumping %p", obj); return; } );
 
 	do {
 		CHECK_FCT_DO(  msg_dump_intern ( level, ref, indent, &outstr, &offset, &outlen ),
-				fd_log_debug_fstr(fd_g_debug_fstr, "Error while dumping %p\n", ref) );
+				fd_log_debug_fstr(fd_g_debug_fstr, "Error while dumping %p", ref) );
 		
 		/* Now find the next object */
 		CHECK_FCT_DO(  fd_msg_browse ( ref, MSG_BRW_WALK, &ref, &indent ), break  );
@@ -891,9 +891,9 @@
 	char *outstr;
 	size_t offset, outlen;
 	CHECK_FCT_DO( dump_init_str(&outstr, &offset, &outlen), 
-			{ fd_log_debug_fstr(fd_g_debug_fstr, "Error initializing string for dumping %p\n", obj); return; } );
+			{ fd_log_debug_fstr(fd_g_debug_fstr, "Error initializing string for dumping %p", obj); return; } );
 	CHECK_FCT_DO(  msg_dump_intern ( level, obj, 1, &outstr, &offset, &outlen ),
-			fd_log_debug_fstr(fd_g_debug_fstr, "Error while dumping %p\n", obj) );
+			fd_log_debug_fstr(fd_g_debug_fstr, "Error while dumping %p", obj) );
 	TRACE_DEBUG(level, "------ Dumping object %p (s)-------", obj);
 	TRACE_DEBUG(level, "%s", outstr);
 	TRACE_DEBUG(level, "------ /end of object %p -------", obj);
--- a/libfdproto/msg_log.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/libfdproto/msg_log.c	Thu Mar 14 18:14:35 2013 +0100
@@ -180,7 +180,7 @@
 	pthread_cleanup_pop(0);
 	(void)pthread_mutex_unlock(&fd_log_lock);
 	
-	fd_log_debug_fstr(fstr, "\n Logged: %s\n", buftime);
+	fd_log_debug_fstr(fstr, " Logged: %s", buftime);
 	
 	/* And now the message itself */
 	if ((meth == FD_MSG_LOGTO_DEBUGONLY) && (fd_g_debug_lvl <= INFO)) {
--- a/libfdproto/sessions.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/libfdproto/sessions.c	Thu Mar 14 18:14:35 2013 +0100
@@ -881,26 +881,26 @@
 	if (!TRACE_BOOL(level))
 		return;
 	
-	fd_log_debug("\t  %*s -- Session @%p --\n", level, "", session);
+	fd_log_debug("\t  %*s -- Session @%p --", level, "", session);
 	if (!VALIDATE_SI(session)) {
-		fd_log_debug("\t  %*s  Invalid session object\n", level, "");
+		fd_log_debug("\t  %*s  Invalid session object", level, "");
 	} else {
 		
-		fd_log_debug("\t  %*s  sid '%s'(%zd), hash %x, msg %d, destroyed %d\n", level, "", session->sid, session->sidlen, session->hash, session->msg_cnt, session->is_destroyed);
+		fd_log_debug("\t  %*s  sid '%s'(%zd), hash %x, msg %d, destroyed %d", level, "", session->sid, session->sidlen, session->hash, session->msg_cnt, session->is_destroyed);
 
 		strftime(buf, sizeof(buf), "%D,%T", localtime_r( &session->timeout.tv_sec , &tm ));
-		fd_log_debug("\t  %*s  timeout %s.%09ld\n", level, "", buf, session->timeout.tv_nsec);
+		fd_log_debug("\t  %*s  timeout %s.%09ld", level, "", buf, session->timeout.tv_nsec);
 
 		CHECK_POSIX_DO( pthread_mutex_lock(&session->stlock), /* ignore */ );
 		pthread_cleanup_push( fd_cleanup_mutex, &session->stlock );
 		for (li = session->states.next; li != &session->states; li = li->next) {
 			struct state * st = (struct state *)(li->o);
-			fd_log_debug("\t  %*s    handler %d registered data %p\n", level, "", st->hdl->id, st->state);
+			fd_log_debug("\t  %*s    handler %d registered data %p", level, "", st->hdl->id, st->state);
 		}
 		pthread_cleanup_pop(0);
 		CHECK_POSIX_DO( pthread_mutex_unlock(&session->stlock), /* ignore */ );
 	}
-	fd_log_debug("\t  %*s -- end of session @%p --\n", level, "", session);
+	fd_log_debug("\t  %*s -- end of session @%p --", level, "", session);
 }
 
 void fd_sess_dump_hdl(int level, struct session_handler * handler)
@@ -908,13 +908,13 @@
 	if (!TRACE_BOOL(level))
 		return;
 	
-	fd_log_debug("\t  %*s -- Handler @%p --\n", level, "", handler);
+	fd_log_debug("\t  %*s -- Handler @%p --", level, "", handler);
 	if (!VALIDATE_SH(handler)) {
-		fd_log_debug("\t  %*s  Invalid session handler object\n", level, "");
+		fd_log_debug("\t  %*s  Invalid session handler object", level, "");
 	} else {
-		fd_log_debug("\t  %*s  id %d, cleanup %p, opaque %p\n", level, "", handler->id, handler->cleanup, handler->opaque);
+		fd_log_debug("\t  %*s  id %d, cleanup %p, opaque %p", level, "", handler->id, handler->cleanup, handler->opaque);
 	}
-	fd_log_debug("\t  %*s -- end of handler @%p --\n", level, "", handler);
+	fd_log_debug("\t  %*s -- end of handler @%p --", level, "", handler);
 }	
 
 int fd_sess_getcount(uint32_t *cnt)
--- a/tests/testcnx.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/tests/testcnx.c	Thu Mar 14 18:14:35 2013 +0100
@@ -713,7 +713,7 @@
 
 		#if 0
 		/* For debug: dump the object */
-		fd_log_debug("Dumping CER\n");
+		fd_log_debug("Dumping CER");
 		fd_msg_dump_walk(0, cer);
 		#endif
 		
--- a/tests/testmesg.c	Thu Mar 14 17:31:16 2013 +0100
+++ b/tests/testmesg.c	Thu Mar 14 18:14:35 2013 +0100
@@ -60,7 +60,7 @@
 		
 		#if 0
 		/* For debug: dump the object */
-		fd_log_debug("Dumping Accounting-Request empty message\n");
+		fd_log_debug("Dumping Accounting-Request empty message");
 		fd_msg_dump_walk( 0, acr );
 		#endif
 	}
@@ -77,9 +77,9 @@
 
 		#if 0
 		/* For debug: dump the object */
-		fd_log_debug("Dumping Proxy-Info AVP\n");
+		fd_log_debug("Dumping Proxy-Info AVP");
 		fd_msg_dump_walk(0, pi);
-		fd_log_debug("Dumping dictionary model\n");
+		fd_log_debug("Dumping dictionary model");
 		fd_dict_dump_object(pi_model);
 		#endif
 		
@@ -105,7 +105,7 @@
 		CHECK( 0, fd_msg_avp_add( acr, MSG_BRW_LAST_CHILD, pi) );
 		#if 0
 		/* For debug: dump the object */
-		fd_log_debug("Dumping Accounting-Request with Proxy-Info AVP at the end\n");
+		fd_log_debug("Dumping Accounting-Request with Proxy-Info AVP at the end");
 		fd_msg_dump_walk(0, acr);
 		#endif
 	}
@@ -363,7 +363,7 @@
 			CHECK( 0, fd_msg_avp_setvalue ( avpi, &value ) );
 			CHECK( 0, fd_msg_update_length ( avpi ) );
 			#if 0
-			fd_log_debug("AVP no vendor, value 3.1415:\n");
+			fd_log_debug("AVP no vendor, value 3.1415:");
 			fd_msg_dump_one(0, avpi);
 			#endif
 			CHECK( 0, fd_msg_avp_hdr ( avpi, &avpdata ) );
@@ -380,7 +380,7 @@
 			CHECK( 0, fd_msg_avp_setvalue ( avpi, &value ) );
 			CHECK( 0, fd_msg_update_length ( avpi ) );
 			#if 0
-			fd_log_debug("AVP vendor, value 0x123456789abcdeL:\n");
+			fd_log_debug("AVP vendor, value 0x123456789abcdeL:");
 			fd_msg_dump_one(0, avpi);
 			#endif
 			CHECK( 0, fd_msg_avp_hdr ( avpi, &avpdata ) );
@@ -406,7 +406,7 @@
 				CHECK( 0, fd_dict_getval ( value_model, &request.search ) );
 				CHECK( 0, fd_msg_avp_setvalue ( avpi, &request.search.enum_value ) );
 				#if 0
-				fd_log_debug("AVP enum i32, value 2 (from const):\n");
+				fd_log_debug("AVP enum i32, value 2 (from const):");
 				fd_msg_dump_one(0, avpi);
 				#endif
 			}
@@ -427,7 +427,7 @@
 				CHECK( 0, fd_dict_getval ( value_model, &request.search ) );
 				CHECK( 0, fd_msg_avp_setvalue ( avpi, &request.search.enum_value ) );
 				#if 0
-				fd_log_debug("AVP enum i32, value -5 (from const):\n");
+				fd_log_debug("AVP enum i32, value -5 (from const):");
 				fd_msg_dump_one(0, avpi);
 				#endif
 				/* Check the size is correct ( 12 for header + 4 for value ) */
@@ -442,7 +442,7 @@
 			CHECK( 0, fd_msg_avp_setvalue ( avpi, &value ) );
 			CHECK( 0, fd_msg_update_length ( avpi ) );
 			#if 0
-			fd_log_debug("AVP vendor enum i32, value -10 (not const):\n");
+			fd_log_debug("AVP vendor enum i32, value -10 (not const):");
 			fd_msg_dump_one(0, avpi);
 			#endif
 			
@@ -457,7 +457,7 @@
 				memset(&buf, 0, sizeof(buf)); /* Test that the OS value is really copied */
 				CHECK( 0, fd_msg_update_length ( avpi ) );
 				#if 0
-				fd_log_debug("AVP octet string, 'This\\0 is a b...'\n");
+				fd_log_debug("AVP octet string, 'This\\0 is a b...'");
 				fd_msg_dump_one(0, avpi);
 				#endif
 				CHECK( 0, fd_msg_avp_hdr ( avpi, &avpdata ) );
@@ -486,7 +486,7 @@
 				CHECK( 0, fd_dict_getval ( value_model, &request.search ) );
 				CHECK( 0, fd_msg_avp_setvalue ( avpi, &request.search.enum_value ) );
 				#if 0
-				fd_log_debug("AVP Enumuerated OctetString (from const):\n");
+				fd_log_debug("AVP Enumuerated OctetString (from const):");
 				fd_msg_dump_one(0, avpi);
 				#endif
 				/* Check the size is correct ( 12 for header + 5 for value ) */
@@ -511,7 +511,7 @@
 				CHECK( 0, fd_dict_getval ( value_model, &request.search ) );
 				CHECK( 0, fd_msg_avp_setvalue ( avpi, &request.search.enum_value ) );
 				#if 0
-				fd_log_debug("AVP Enumuerated OctetString (from const):\n");
+				fd_log_debug("AVP Enumuerated OctetString (from const):");
 				fd_msg_dump_one(0, avpi);
 				#endif
 				/* Check the size is correct ( 12 for header + 3 for value ) */
@@ -533,7 +533,7 @@
 				value.os.len = 8;
 				CHECK( 0, fd_msg_avp_setvalue ( avpch, &value ) );
 				#if 0
-				fd_log_debug("AVP octet string, '1234678'\n");
+				fd_log_debug("AVP octet string, '1234678'");
 				fd_msg_dump_one(0, avpch);
 				#endif
 				CHECK( 0, fd_msg_update_length ( avpch ) );
@@ -546,7 +546,7 @@
 				value.os.len = 9;
 				CHECK( 0, fd_msg_avp_setvalue ( avpch, &value ) );
 				#if 0
-				fd_log_debug("AVP octet string, '12346789'\n");
+				fd_log_debug("AVP octet string, '12346789'");
 				fd_msg_dump_one(0, avpch);
 				#endif
 			  }
"Welcome to our mercurial repository"