Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members   Examples  

AxisTrace.h

Go to the documentation of this file.
00001 /*
00002  *   Copyright 2003-2004 The Apache Software Foundation.
00003  *
00004  *   Licensed under the Apache License, Version 2.0 (the "License");
00005  *   you may not use this file except in compliance with the License.
00006  *   You may obtain a copy of the License at
00007  *
00008  *       http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  *   Unless required by applicable law or agreed to in writing, software
00011  *   distributed under the License is distributed on an "AS IS" BASIS,
00012  *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  *   See the License for the specific language governing permissions and
00014  *   limitations under the License.
00015  */ 
00016 
00024 #ifndef __AXISLOG_H_INCLUDED_
00025 #define __AXISLOG_H_INCLUDED_
00026 
00027 #include "GDefine.h"
00028 #include "AxisFile.h"
00029 #include <list>
00030 #include <string>
00031 #include <stdio.h>
00032 
00033 #if defined(ENABLE_AXISTRACE)  
00034   #define AXISTRACE1(X, Y) g_pAT->logaxis(X,Y,__FILE__,__LINE__);
00035   #define AXISTRACE2(X, Y, Z) g_pAT->logaxis(X,Y,Z,__FILE__,__LINE__);
00036   #define AXISTRACE3(X) g_pAT->trace(X);
00037   
00038 #endif
00039 #if !defined(ENABLE_AXISTRACE)
00040   #define AXISTRACE1(X,Y) "";
00041   #define AXISTRACE2(X,Y,Z) "";
00042   #define AXISTRACE3(X) "";
00043 #endif
00044 
00045 
00046 using namespace std;
00047 
00058 class AxisTrace
00059 {
00060 public:
00061     AxisTrace();
00062     virtual ~AxisTrace();
00063 
00079     int logaxis(const char* sLog, int level, char* arg2, int arg3);
00080 
00097     int logaxis(const char* sLog1, const char* sLog2, int level, char* arg3, 
00098         int arg4);
00099 
00116     int logaxis(const char* sLog1, const int nLog2, int level, char* arg3, 
00117         int arg4);
00118 
00135     int logaxis(const char* sLog1, const double dLog2, int level, 
00136         char* arg3, int arg4);
00137 
00146     int trace(const char* pchLog);
00147 
00157     int openFile();
00158 
00168     int openFileByClient();
00169   
00170 private:
00171         bool m_bLoggingOn;
00172     char m_acLine[4];
00173     char* m_pcLevel;
00174     AxisFile m_fileTrace;
00175 
00176     int setFilePerm(const char* pcFileName);
00177     int logthis(const char* pcLog, int level, char* arg2, int arg3);
00178 
00179 };
00180 
00181 /* static AxisTrace tracer; */
00182 
00183 #endif
00184 

Generated on Tue Jun 29 09:27:56 2004 for AxisC++ by doxygen1.2.18