Google
Web alhem.net
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

MyErrlog Class Reference

#include <MyErrlog.h>

List of all members.

Public Member Functions

void error (Database &, const std::string &)
void error (Database &, Query &, const std::string &)


Detailed Description

File ......... MyErrlog.h Published .... 2004-09-27

Definition at line 28 of file MyErrlog.h.


Member Function Documentation

void MyErrlog::error Database &  ,
Query &  ,
const std::string & 
 

Definition at line 68 of file MyErrlog.cpp.

References D2.

00069 { 00070 time_t t = time(NULL); 00071 struct tm *tp = localtime(&t); 00072 char errstr[1000]; 00073 sprintf(errstr,"%d-%02d-%02d %02d:%02d:%02d :: Query: %s: %s(%d)\n", 00074 tp -> tm_year + 1900,tp -> tm_mon + 1,tp -> tm_mday, 00075 tp -> tm_hour,tp -> tm_min, tp -> tm_sec, 00076 str.c_str(),q.GetError().c_str(),q.GetErrno()); 00077 sprintf(errstr + strlen(errstr)," (QUERY: \"%s\")\n",q.GetLastQuery().c_str()); 00078 #ifdef _DEBUG 00079 ::MessageBox(NULL, errstr, "MySQL", MB_OK); 00080 #endif 00081 D2(fprintf(fil,"%s",errstr);) 00082 }

void MyErrlog::error Database &  ,
const std::string & 
 

Definition at line 52 of file MyErrlog.cpp.

References D2.

00053 { 00054 time_t t = time(NULL); 00055 struct tm *tp = localtime(&t); 00056 char errstr[1000]; 00057 sprintf(errstr,"%d-%02d-%02d %02d:%02d:%02d :: Database: %s\n", 00058 tp -> tm_year + 1900,tp -> tm_mon + 1,tp -> tm_mday, 00059 tp -> tm_hour,tp -> tm_min, tp -> tm_sec, 00060 str.c_str()); 00061 #ifdef _DEBUG 00062 ::MessageBox(NULL, errstr, "MySQL", MB_OK); 00063 #endif 00064 D2(fprintf(fil,"%s",errstr);) 00065 }


The documentation for this class was generated from the following files:
Generated on Thu Feb 10 22:42:40 2005 for Distributed URL Classification Tool by doxygen 1.3.7