# 1 "tst_hlog.cxx"
# 1 "hlog.hxx" 1



# 1 "/prj/easytax/local/lib/gcc-lib/hppa1.1-hp-hpux10.10/2.8.1/include/stdarg.h" 1 3
 






















# 1 "/prj/easytax/local/lib/gcc-lib/hppa1.1-hp-hpux10.10/2.8.1/include/va-pa.h" 1 3

 




typedef void *__gnuc_va_list;


 













 




















void va_end (__gnuc_va_list);		 



 



# 24 "/prj/easytax/local/lib/gcc-lib/hppa1.1-hp-hpux10.10/2.8.1/include/stdarg.h" 2 3

# 130 "/prj/easytax/local/lib/gcc-lib/hppa1.1-hp-hpux10.10/2.8.1/include/stdarg.h" 3






 
 













# 168 "/prj/easytax/local/lib/gcc-lib/hppa1.1-hp-hpux10.10/2.8.1/include/stdarg.h" 3


 




 

 

 

typedef __gnuc_va_list va_list;
























# 4 "hlog.hxx" 2


 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

 

class log_base 
{
  private:
 
    log_base   *prev;
 
 
 
 
  protected:
 
    int _debugLevel;
 
 
 
 
 
  public:
 
    virtual void log(int log_type,char *format,va_list arg) = 0;
 
 
 
 
 
    virtual void __debug(int log_type,char *format,va_list arg) = 0;
 
 
 
 
  public:
 
    bool debugOn(void)  
    { _debugLevel!=0; }
 
 
 
 
 
 
    void debugLevel(int level=1);
 
 
 
 
 
 
 
    void debugOff(void)	
    { debugLevel(0); }
 
 
 
 
  public:
 
    log_base();
 
 
 
 
 
 
    virtual ~log_base();
 
 
 
 
 
 
 
};

 

 

 
void log(int log_type,char *format,...);
 
 
 
 
 

 
void __debug(int debug_type,char *format,...);
 
 
 
 
 
 
bool debugOn(void);
 
 
 
 
 


 

 
 
 
 
 
 

 

 
 
 
 
 
 

class log_cerr : public log_base
{
  public:
 
    virtual void log(int log_type,char *format,va_list arg);
 
 
 
 
 
    virtual void __debug(int debug_type,char *format,va_list arg);
 
 
 
 
 
};

 

class log_syslog : public log_base
{
  private:
    char *_prgname;
  public:
 
    log_syslog::log_syslog(char *prgname);
 
 
 
 
 
    log_syslog::~log_syslog();
 
 
 
 
  public:
 
    virtual void log(int log_type,char *format,va_list arg);
 
 
 
 
 
    virtual void __debug(int debug_type,char *format,va_list arg);
 
 
 
 
 
};




# 1 "tst_hlog.cxx" 2


int main(int argc,char *argv[])
{
  log_syslog slg(argv[0]);
  slg.debugLevel();

   log(0,"hallo allemaal %s %d","hoi",1000);

 { log_cerr lg;
   log(0,"hallo allemaal %s %d","hoi",1001);
   if (debugOn()) __debug (0,"hallo allemaal %s","jojo");
   lg.debugLevel();
   if (debugOn()) __debug (0,"hallo allemaal %s","jojo");
 }

 slg.debugLevel();
   log(0,"hallo allemaal %s %d","hoi",1002);
   if (debugOn()) __debug (0,"hallo allemaal %s","jojojo");

return 0;
}
