You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by wh...@apache.org on 2004/10/12 17:20:22 UTC

cvs commit: ws-axis/c/src/common AxisTrace.cpp AxisTrace.h

whitlock    2004/10/12 08:20:22

  Modified:    c/src/common AxisTrace.cpp AxisTrace.h
  Log:
  Don't enter trace class methods if trace off, and improve the look of the
  trace file.
  
  Revision  Changes    Path
  1.31      +8 -0      ws-axis/c/src/common/AxisTrace.cpp
  
  Index: AxisTrace.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/common/AxisTrace.cpp,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- AxisTrace.cpp	23 Sep 2004 15:12:56 -0000	1.30
  +++ AxisTrace.cpp	12 Oct 2004 15:20:22 -0000	1.31
  @@ -259,6 +259,14 @@
       return AXIS_SUCCESS;
   }
   
  +void AxisTrace::traceLine(const char *data) 
  +{
  +    if (!isTraceOn()) return;
  +    m_fileTrace.filePuts(data);
  +    m_fileTrace.filePuts("\n");
  +    return;
  +}
  +
   /*
   int main(int argc, char* argv[])
   {
  
  
  
  1.10      +11 -1     ws-axis/c/src/common/AxisTrace.h
  
  Index: AxisTrace.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/common/AxisTrace.h,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- AxisTrace.h	6 Aug 2004 14:44:28 -0000	1.9
  +++ AxisTrace.h	12 Oct 2004 15:20:22 -0000	1.10
  @@ -164,7 +164,17 @@
        * (AXIS_SUCCESS) or not (AXIS_FAIL).
        */
       int openFileByClient();
  -  
  +
  +    /**
  +     * Finds out whether trace is on.
  +     */
  +    inline bool isTraceOn() { return m_bLoggingOn; }
  +
  +    /**
  +     * Traces a single line.
  +     */  
  +    void traceLine(const char *data);
  +
   private:
   	bool m_bLoggingOn;
       char m_acLine[4];