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;
