summaryrefslogtreecommitdiff
path: root/debug.h
blob: f7a7f7fd01bed6033b6fc4eb8d81f4b2bdb082ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef __DEBUG_DVDSWITCH_H
#define __DEBUG_DVDSWITCH_H

#include <stdio.h>

#define DEBUG(a...) DebugLog.WriteLine(__FILE__, __LINE__, a)

class cDebugLog
{
  private:
    char *FileName;
    FILE *File;
    

    bool Open(void);
    void Close(void);
  public:
    cDebugLog(void);
    ~cDebugLog(void);

    bool SetLogFile(char *filename);
    void WriteLine(char *file, int line, char *format, ...);
    void End(void);
};

extern cDebugLog DebugLog;

#endif // __DEBUG_DVDSWITCH_H