Rev 6 | Blame | Compare with Previous | Last modification | View Log
#pragma once#include <stdio.h>#include <stdarg.h>#include <direct.h>#include "nteventlogsource.h"#define MAX_MSG 2048#define TRACE_TEXT 0#define TRACE_START 1#define TRACE_STOP 2class DbgView: public CObject{public:DbgView( void);DbgView( char *AppName);~DbgView( void);DbgView( const DbgView &obj); //copy constructorvoid CodeTrace( char *codetracetext, int level, int event, int type,char *bin, int binlen, ...);int GetTraceLevel( void) {return m_iDebugLevel;}void SetTraceLevel( int level) {m_iDebugLevel = level;}int GetLog2DbgViewer( void) {return m_iLog2DebugViewer;}int GetLog2Screen( void) {return m_iLog2Screen;}int GetLog2File( void) {return m_iLog2File;}int GetLog2EventViewer( void) {return m_iLog2EventViewer;}void SetLog2DbgViewer( int onoff) {m_iLog2DebugViewer = onoff;}void SetLog2Screen( int onoff) {m_iLog2Screen = onoff;}void SetLog2File( int onoff) {m_iLog2File = onoff;}void SetLog2EventViewer( int onoff) {m_iLog2EventViewer = onoff;}void SetEventLogging( char *AppName);private:int m_iFirstCodeTrace; //first codetrace empties log fileCString m_sCommandLine; //command line of the taskCString m_sIniFile; //ini file name, including directoryCString m_sIniFileApp; //ini file located in the application dirint m_iLog2File; //enable debug logging to fileint m_iLog2EventViewer; //enable logging to event viewerint m_iLog2Screen; //enable logging to cmd windowint m_iLog2DebugViewer; //enable logging to standard debuggerint m_iDebugLevel; //debug level 1 .. 4CString m_sLogFile; //log file name, including directorystatic CNTEventLogSource *EventLog;int Log2EventViewer( int Type, char *msg);int m_iCopy;};