#ifndef _KLOG_H_
#define _KLOG_H_

#include <log4cpp/Category.hh>

class cKlog
{
public:
   enum KlogPiority 
      {
      EMERG  = 0, 
      FATAL  = 0,
      ALERT  = 100,
      CRIT   = 200,
      ERROR  = 300, 
      WARN   = 400,
      NOTICE = 500,
      INFO   = 600,
      DEBUG  = 700,
      NOTSET = 800
      };
   static void init(KlogPiority p = INFO);
   static void init(const char * cfg_file_name);
   static log4cpp::Category & getLog(const char * cat_name);
   cKlog(const char * cat_name);
   void setLogName(const char * cat_name);
   void fatal(const char * fmt,...);
   void error(const char * fmt,...);
   void warn(const char * fmt,...);
   void info(const char * fmt,...);
   void debug(const char * fmt,...);
   bool debugEnabled();
private:
   static bool mInitialised;
   const char * mCatName;
   char mLogBuffer[1024];
};

#endif


