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);
