src/server/Debug.cxx File Reference

#include <Debug.h>

Include dependency graph for Debug.cxx:

Go to the source code of this file.

Functions

int printError1 (DbRetVal val, char *fname, int lno, char *format,...)
int printDebug1 (int module, char *fname, int lno, char *format,...)

Variables

int DebugDM_Alloc = 0
int DebugDM_VarAlloc = 0
int DebugDM_Lock = 0
int DebugDM_Transaction = 0
int DebugDM_UndoLog = 0
int DebugDM_RedoLog = 0
int DebugDM_Index = 0
int DebugDM_HashIndex = 0
int DebugDM_SystemDatabase = 0
int DebugDM_Database = 0
int DebugDM_Table = 0
int DebugDM_Predicate = 0
int DebugDM_TableIterator = 0
int DebugDM_Process = 0
int DebugDM_Network = 0
int DebugDM_Gateway = 0
int DebugDM_Adapter = 0
int DebugDM_SqlLog = 0


Function Documentation

int printDebug1 ( int  module,
char *  fname,
int  lno,
char *  format,
  ... 
)

Definition at line 61 of file Debug.cxx.

References DebugDM_Adapter, DebugDM_Alloc, DebugDM_Database, DebugDM_Gateway, DebugDM_HashIndex, DebugDM_Lock, DebugDM_Network, DebugDM_Predicate, DebugDM_Process, DebugDM_RedoLog, DebugDM_SqlLog, DebugDM_SystemDatabase, DebugDM_Table, DebugDM_TableIterator, DebugDM_Transaction, DebugDM_UndoLog, DebugDM_VarAlloc, DM_Adapter, DM_Alloc, DM_Database, DM_Gateway, DM_HashIndex, DM_Iterator, DM_Lock, DM_Network, DM_Predicate, DM_Process, DM_RedoLog, DM_SqlLog, DM_SystemDatabase, DM_Table, DM_Transaction, DM_UndoLog, DM_VarAlloc, os::getpid(), os::getthrid(), moduleNames, and os::write().

00062 {
00063   switch(module) {
00064      case DM_Alloc: { if (!DebugDM_Alloc) return 1; break; }
00065      case DM_VarAlloc: { if (!DebugDM_VarAlloc) return 1; break; }
00066      case DM_Lock: { if (!DebugDM_Lock) return 1; break; }
00067      case DM_Transaction: { if (!DebugDM_Transaction) return 1; break; }
00068      case DM_UndoLog: { if (!DebugDM_UndoLog) return 1; break; }
00069      case DM_RedoLog: { if (!DebugDM_RedoLog) return 1; break; }
00070      case DM_HashIndex: { if (!DebugDM_HashIndex) return 1; break; }
00071      case DM_SystemDatabase: { if (!DebugDM_SystemDatabase) return 1; break; }
00072      case DM_Database: { if (!DebugDM_Database) return 1; break; }
00073      case DM_Table: { if (!DebugDM_Table) return 1; break; }
00074      case DM_Iterator: { if (!DebugDM_TableIterator) return 1; break; }
00075      case DM_Predicate: { if (!DebugDM_Predicate) return 1; break; }
00076      case DM_Process: { if (!DebugDM_Process) return 1; break; }
00077      case DM_Network: { if (!DebugDM_Network) return 1; break; }
00078      case DM_Gateway: { if (!DebugDM_Gateway) return 1; break; }
00079      case DM_Adapter: { if (!DebugDM_Adapter) return 1; break; }
00080      case DM_SqlLog: { if (!DebugDM_SqlLog) return 1; break; }
00081 
00082   }
00083 
00084   va_list ap;
00085   char mesgBuf[1024];
00086 
00087   sprintf(mesgBuf, "D:%s:%d:%lu:%s:%d:", moduleNames[module],
00088            os::getpid(), os::getthrid(), fname, lno);
00089   os::write(1, mesgBuf, strlen(mesgBuf));
00090 
00091   va_start(ap, format);
00092 
00093   int err = ::vsnprintf(mesgBuf, sizeof(mesgBuf), format,ap);
00094   if(err < 0) {
00095       return err;
00096   }
00097   os::write(1, mesgBuf, strlen(mesgBuf));
00098   strcpy(mesgBuf,"\n");
00099   os::write(1, mesgBuf, strlen(mesgBuf));
00100    //1->stdout
00101   return 0;
00102 }

Here is the call graph for this function:

int printError1 ( DbRetVal  val,
char *  fname,
int  lno,
char *  format,
  ... 
)

Definition at line 37 of file Debug.cxx.

References os::getpid(), os::getthrid(), and os::write().

00038 {
00039   va_list ap;
00040   char mesgBuf[1024];
00041 
00042   sprintf(mesgBuf, "%d:%lu:%s:%d:",
00043            os::getpid(), os::getthrid(), fname, lno);
00044   os::write(2, mesgBuf, strlen(mesgBuf));
00045 
00046   va_start(ap, format);
00047 
00048   int err = ::vsnprintf(mesgBuf, sizeof(mesgBuf), format,ap);
00049   if(err < 0) {
00050       return err;
00051   }
00052   os::write(2, mesgBuf, strlen(mesgBuf));
00053   strcpy(mesgBuf,"\n");
00054   os::write(2, mesgBuf, strlen(mesgBuf));
00055    //2->stderr
00056   return 0;
00057 }

Here is the call graph for this function:


Variable Documentation

int DebugDM_Adapter = 0

Definition at line 34 of file Debug.cxx.

Referenced by printDebug1().

int DebugDM_Alloc = 0

Definition at line 18 of file Debug.cxx.

Referenced by printDebug1().

int DebugDM_Database = 0

Definition at line 27 of file Debug.cxx.

Referenced by printDebug1().

int DebugDM_Gateway = 0

Definition at line 33 of file Debug.cxx.

Referenced by printDebug1().

int DebugDM_HashIndex = 0

Definition at line 25 of file Debug.cxx.

Referenced by printDebug1().

int DebugDM_Index = 0

Definition at line 24 of file Debug.cxx.

int DebugDM_Lock = 0

Definition at line 20 of file Debug.cxx.

Referenced by printDebug1().

int DebugDM_Network = 0

Definition at line 32 of file Debug.cxx.

Referenced by printDebug1().

int DebugDM_Predicate = 0

Definition at line 29 of file Debug.cxx.

Referenced by printDebug1().

int DebugDM_Process = 0

Definition at line 31 of file Debug.cxx.

Referenced by printDebug1().

int DebugDM_RedoLog = 0

Definition at line 23 of file Debug.cxx.

Referenced by printDebug1().

int DebugDM_SqlLog = 0

Definition at line 35 of file Debug.cxx.

Referenced by printDebug1().

int DebugDM_SystemDatabase = 0

Definition at line 26 of file Debug.cxx.

Referenced by printDebug1().

int DebugDM_Table = 0

Definition at line 28 of file Debug.cxx.

Referenced by printDebug1().

int DebugDM_TableIterator = 0

Definition at line 30 of file Debug.cxx.

Referenced by printDebug1().

int DebugDM_Transaction = 0

Definition at line 21 of file Debug.cxx.

Referenced by printDebug1().

int DebugDM_UndoLog = 0

Definition at line 22 of file Debug.cxx.

Referenced by printDebug1().

int DebugDM_VarAlloc = 0

Definition at line 19 of file Debug.cxx.

Referenced by printDebug1().


Generated on Mon Jun 9 22:41:36 2008 for csql by  doxygen 1.4.7