axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lilantha Darshana" <Lilan...@virtusa.com>
Subject RE: cvs commit: ws-axis/c/src/engine Axis.cpp
Date Mon, 15 Dec 2003 02:18:37 GMT
Lets plan to introduce Log4C or Log4C++ within the 
code base. For the time being make it a TODO item.

Thanks
-Lilantha

-----Original Message-----
From: damitha@apache.org [mailto:damitha@apache.org]
Sent: Friday, December 12, 2003 9:01 PM
To: ws-axis-cvs@apache.org
Subject: cvs commit: ws-axis/c/src/engine Axis.cpp


damitha     2003/12/12 07:00:43

  Modified:    c/include/axis/common Tag:
                        Release-2003_10_26-bugfixes_branch AxisTrace.h
               c/src/client/samples/Calculator Tag:
                        Release-2003_10_26-bugfixes_branch CalcClient.cpp
               c/src/common Tag: Release-2003_10_26-bugfixes_branch
                        AxisTrace.cpp
               c/src/engine Tag: Release-2003_10_26-bugfixes_branch
                        Axis.cpp
  Log:
  Now the log mechanism is improved so that we can have log file for
  client side too.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.4.2.6   +2 -1      ws-axis/c/include/axis/common/AxisTrace.h
  
  Index: AxisTrace.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/include/axis/common/AxisTrace.h,v
  retrieving revision 1.4.2.5
  retrieving revision 1.4.2.6
  diff -u -r1.4.2.5 -r1.4.2.6
  --- AxisTrace.h	12 Dec 2003 13:47:20 -0000	1.4.2.5
  +++ AxisTrace.h	12 Dec 2003 15:00:43 -0000	1.4.2.6
  @@ -64,7 +64,7 @@
   #include <string>
   #include <stdio.h>
   
  -#define __AXISTRACE__
  +//#define __AXISTRACE__
   #if defined(__AXISTRACE__)  
     #define AXISTRACE1(X, Y) g_pAT->logaxis(X,Y,__FILE__,__LINE__);
     #define AXISTRACE2(X,Y, Z) g_pAT->logaxis(X,Y,Z,__FILE__,__LINE__);
  @@ -102,6 +102,7 @@
   	 */
   	int trace(const char* pchLog);
       int openFile();
  +    int openFileByClient();
     
   private:
       char strLine[4];
  
  
  
  No                   revision
  No                   revision
  1.10.2.2  +2 -0      ws-axis/c/src/client/samples/Calculator/CalcClient.cpp
  
  Index: CalcClient.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/client/samples/Calculator/CalcClient.cpp,v
  retrieving revision 1.10.2.1
  retrieving revision 1.10.2.2
  diff -u -r1.10.2.1 -r1.10.2.2
  --- CalcClient.cpp	27 Nov 2003 10:26:58 -0000	1.10.2.1
  +++ CalcClient.cpp	12 Dec 2003 15:00:43 -0000	1.10.2.2
  @@ -3,10 +3,12 @@
   
   #include "Calculator.h"
   
  +
   #define ARRAYSIZE 40 //It seems that this crashes when the packetsize > buffersize/2.
this happens at 50 
   
   int main(int argc, char* argv[])
   {
  +    
   	Calculator cal;
   	
   	for (int n=0;n<1; n++)
  
  
  
  No                   revision
  No                   revision
  1.9.2.4   +13 -11    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.9.2.3
  retrieving revision 1.9.2.4
  diff -u -r1.9.2.3 -r1.9.2.4
  --- AxisTrace.cpp	12 Dec 2003 13:47:20 -0000	1.9.2.3
  +++ AxisTrace.cpp	12 Dec 2003 15:00:43 -0000	1.9.2.4
  @@ -107,6 +107,16 @@
       return AXIS_SUCCESS;
   }
   
  +int AxisTrace::openFileByClient()
  +{
  +    char* sFileName =  "./ClientAxisLog";
  +    
  +    if((fileTrace = fopen(sFileName, "ab")) == NULL)
  +        return AXIS_FAIL;
  +
  +    return AXIS_SUCCESS;
  +}
  +
   /** 
   *   Logs messages according to their severity level.
   *   @param sLog log message
  @@ -116,10 +126,6 @@
   */
   int AxisTrace::logaxis(const char* sLog, int level, char* arg2, int arg3)
   {
  -    if(!fileTrace)
  -        return AXIS_FAIL;
  -    
  -    
       time_t ltime;
       time(&ltime);
   
  @@ -149,8 +155,7 @@
       fputs("\n", fileTrace);
       fputs("-------------------------------------------------", fileTrace);
       fputs("\n", fileTrace);
  -        
  -    //fclose(fileTrace);    
  +            
       /*
           *fout << "time:" << ctime(&ltime)
           << " :file:"<< arg2 << " :line:" << arg3 << ":" <<
endl
  @@ -170,10 +175,7 @@
   *   @param arg3 line number
   */
   int AxisTrace::logaxis(const char* sLog1, const char* sLog2, int level, char* arg3, int
arg4)
  -{
  -    if(!fileTrace)
  -        return AXIS_FAIL; 
  -  
  +{ 
       time_t ltime;
       time(&ltime);
   
  @@ -203,7 +205,7 @@
       fputs("\n", fileTrace);
       fputs("-------------------------------------------------", fileTrace);
       fputs("\n", fileTrace);
  -    //fclose(fileTrace);
  +    
           
       /**fout << "time:" << ctime(&ltime)
       << " :file:"<< arg3 << " :line:" << arg4 << endl
  
  
  
  No                   revision
  No                   revision
  1.30.2.4  +10 -1     ws-axis/c/src/engine/Axis.cpp
  
  Index: Axis.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/engine/Axis.cpp,v
  retrieving revision 1.30.2.3
  retrieving revision 1.30.2.4
  diff -u -r1.30.2.3 -r1.30.2.4
  --- Axis.cpp	12 Dec 2003 13:47:20 -0000	1.30.2.3
  +++ Axis.cpp	12 Dec 2003 15:00:43 -0000	1.30.2.4
  @@ -243,6 +243,7 @@
   
   extern "C" int initialize_module(int bServer)
   {
  +    int status = 0;
   	//order of these initialization method invocation should not be changed
   //	AXISTRACE1("inside initialize_module\n");
   	XMLPlatformUtils::Initialize();
  @@ -261,7 +262,7 @@
           {
               char* pWsddPath = g_pConfig->GetWsddFilePath();
               if (AXIS_SUCCESS != g_pWSDDDeployment->LoadWSDD(pWsddPath)) return AXIS_FAIL;
  -            int status = g_pAT->openFile();
  +            status = g_pAT->openFile();
               if(status == AXIS_FAIL)
               {
                   return AXIS_FAIL;
  @@ -278,6 +279,14 @@
               return AXIS_FAIL;
           }
   	}
  +    else if(bServer == 0)//client side module initialization
  +    {
  +        status = g_pAT->openFileByClient();
  +        if(status == AXIS_FAIL)
  +        {
  +            return AXIS_FAIL;
  +        }
  +    }
   	return AXIS_SUCCESS;
   }
   
  
  
  

Mime
View raw message