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 "AxisFile.h"
00028 
00029 #if defined(ENABLE_AXISTRACE)  
00030   #define AXISTRACE1(X, Y) g_pAT->logaxis(X,Y,__FILE__,__LINE__);
00031   #define AXISTRACE2(X, Y, Z) g_pAT->logaxis(X,Y,Z,__FILE__,__LINE__);
00032   #define AXISTRACE3(X) g_pAT->trace(X);
00033   
00034 #endif
00035 #if !defined(ENABLE_AXISTRACE)
00036   #define AXISTRACE1(X,Y) "";
00037   #define AXISTRACE2(X,Y,Z) "";
00038   #define AXISTRACE3(X) "";
00039 #endif
00040 
00041 
00042 //using namespace std;
00043 
00054 class AxisTrace
00055 {
00056 public:
00057     AxisTrace();
00058     virtual ~AxisTrace();
00059 
00075     int logaxis(const char* sLog, int level, char* arg2, int arg3);
00076 
00093     int logaxis(const char* sLog1, const char* sLog2, int level, char* arg3, 
00094         int arg4);
00095 
00112     int logaxis(const char* sLog1, const int nLog2, int level, char* arg3, 
00113         int arg4);
00114 
00131     int logaxis(const char* sLog1, const double dLog2, int level, 
00132         char* arg3, int arg4);
00133 
00142     int trace(const char* pchLog);
00143 
00153     int openFile();
00154 
00164     int openFileByClient();
00165   
00166 private:
00167         bool m_bLoggingOn;
00168     char m_acLine[4];
00169     char* m_pcLevel;
00170     AxisFile m_fileTrace;
00171 
00172     int setFilePerm(const char* pcFileName);
00173     int logthis(const char* pcLog, int level, char* arg2, int arg3);
00174 
00175 };
00176 
00177 /* static AxisTrace tracer; */
00178 
00179 #endif
00180 

Generated on Fri Jul 9 13:18:28 2004 for AxisC++ by doxygen1.2.18