Update of /cvsroot/perfparse/_perfparse/libpp_mysql
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29306/libpp_mysql
Modified Files:
dbms.c del_policy.c
Log Message:
enhance error logging
Index: dbms.c
===================================================================
RCS file: /cvsroot/perfparse/_perfparse/libpp_mysql/dbms.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** dbms.c 9 Apr 2007 22:39:09 -0000 1.5
--- dbms.c 6 Jun 2007 09:53:14 -0000 1.6
***************
*** 86,90 ****
void pp_mysql_default_sql_failure(char*f,int l, const char*str, const char *error) {
! pp_log(f,l,"%s (%s)",str,error);
exit(EXIT_FAILURE);
}
--- 86,90 ----
void pp_mysql_default_sql_failure(char*f,int l, const char*str, const char *error) {
! pp_log(f,l,LOG_ERROR,"%s (%s)",str,error);
exit(EXIT_FAILURE);
}
***************
*** 229,233 ****
if(NULL == sql_failure) sql_failure = pp_mysql_default_sql_failure;
if (!mysql_init (&db_mysql)) {
! pp_log(__FILE__,__LINE__, "Cannot initialise MySQL");
sql_failure(__FILE__, __LINE__, "CONNECT", "Cannot initialise MySQL");
exit(EXIT_FAILURE);
--- 229,233 ----
if(NULL == sql_failure) sql_failure = pp_mysql_default_sql_failure;
if (!mysql_init (&db_mysql)) {
! pp_log(__FILE__,__LINE__,LOG_ERROR, "Cannot initialise MySQL");
sql_failure(__FILE__, __LINE__, "CONNECT", "Cannot initialise MySQL");
exit(EXIT_FAILURE);
***************
*** 266,270 ****
if (bTerminate) {
! pp_log(__FILE__,__LINE__, "Error %s: %s", s_SQL->str, mysql_error(&db_mysql));
sql_failure(__FILE__, __LINE__, s_SQL->str, mysql_error(&db_mysql));
exit(EXIT_FAILURE);
--- 266,270 ----
if (bTerminate) {
! pp_log(__FILE__,__LINE__,LOG_ERROR, "Error %s: %s", s_SQL->str, mysql_error(&db_mysql));
sql_failure(__FILE__, __LINE__, s_SQL->str, mysql_error(&db_mysql));
exit(EXIT_FAILURE);
Index: del_policy.c
===================================================================
RCS file: /cvsroot/perfparse/_perfparse/libpp_mysql/del_policy.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** del_policy.c 23 Dec 2006 00:03:46 -0000 1.2
--- del_policy.c 6 Jun 2007 09:53:14 -0000 1.3
***************
*** 243,247 ****
/* FIXME: used to be a call to fail() */
! pp_log(__FILE__,__LINE__, "Unknown template type '%d' requested.", iType);
exit(EXIT_FAILURE);
--- 243,247 ----
/* FIXME: used to be a call to fail() */
! pp_log(__FILE__,__LINE__, LOG_ERROR,"Unknown template type '%d' requested.", iType);
exit(EXIT_FAILURE);
***************
*** 255,259 ****
/* FIXME: used to be a call to fail() */
! pp_log(__FILE__,__LINE__, "Unknown template type '%s' requested.", sIn);
exit(EXIT_FAILURE);
}
--- 255,259 ----
/* FIXME: used to be a call to fail() */
! pp_log(__FILE__,__LINE__, LOG_ERROR,"Unknown template type '%s' requested.", sIn);
exit(EXIT_FAILURE);
}
|