"Fossies" - the Fresh Open Source Software Archive

Member "xstress/include/logger.h" (19 Feb 2009, 784 Bytes) of package /linux/privat/old/xstress-src-0.375-beta-20090219.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "logger.h" see the Fossies "Dox" file reference documentation.

    1 
    2 /*
    3  * xstress - xk0derz SMTP Stress Tester
    4  *
    5  * (c) Amit Singh amit@xkoder.com
    6  * http://xkoder.com
    7  *
    8  * This software and related files are licensed under GNU GPL version 2
    9  * Please visit the following webpage for more details
   10  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
   11  */
   12 
   13 #ifndef __LOGGER_H__
   14 #define __LOGGER_H__
   15 
   16 #include "common.h"
   17 
   18 using namespace std;
   19 
   20 class Logger
   21 {
   22   string sLogFile;
   23   string sCache;
   24   int iThreshold;
   25   int threadId;
   26 
   27   public:
   28   Logger(string _LogFile=DEFAULT_LOG_FILE,int _cacheThreshold=DEFAULT_CACHE_THRESHOLD);
   29   void log(string _msg);
   30   void resetThreshold(int _cacheThreshold);
   31   void flush();
   32   void setLogFile(string sFileName);
   33   void setThreadId(int _id);
   34   int  getThreadId();
   35   ~Logger();
   36 };
   37 
   38 extern Logger logger;
   39 
   40 #endif