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