00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _WIZARDSTOOLKIT_LOG_H
00019 #define _WIZARDSTOOLKIT_LOG_H
00020
00021 #if defined(__cplusplus) || defined(c_plusplus)
00022 extern "C" {
00023 #endif
00024
00025 #include <stdarg.h>
00026 #include "wizard/exception.h"
00027 #include "wizard/timer.h"
00028
00029 #if !defined(GetWizardModule)
00030 # define GetWizardModule() __FILE__,__func__,(unsigned long) __LINE__
00031 #endif
00032
00033 #define WizardLogFilename "log.xml"
00034
00035 typedef enum
00036 {
00037 UndefinedEvents,
00038 NoEvents = 0x0000,
00039 TraceEvent = 0x0001,
00040 AnnotateEvent = 0x0002,
00041 BlobEvent = 0x0004,
00042 CacheEvent = 0x0008,
00043 CoderEvent = 0x0010,
00044 ConfigureEvent = 0x0020,
00045 DeprecateEvent = 0x0040,
00046 ExceptionEvent = 0x0080,
00047 LocaleEvent = 0x0100,
00048 ModuleEvent = 0x0200,
00049 ResourceEvent = 0x0400,
00050 TransformEvent = 0x0800,
00051 WarningEvent = 0x1000,
00052 UserEvent = 0x2000,
00053 AllEvents = 0x7fffffff
00054 } LogEventType;
00055
00056 typedef struct _LogInfo
00057 LogInfo;
00058
00059 extern WizardExport char
00060 **GetLogList(const char *,size_t *,ExceptionInfo *);
00061
00062 extern WizardExport const LogInfo
00063 *GetLogInfo(const char *,ExceptionInfo *),
00064 **GetLogInfoList(const char *,size_t *,ExceptionInfo *);
00065
00066 extern WizardExport LogEventType
00067 SetLogEventMask(const char *);
00068
00069 extern WizardExport WizardBooleanType
00070 IsEventLogging(void),
00071 ListLogInfo(FILE *,ExceptionInfo *),
00072 LogComponentGenesis(void),
00073 LogWizardEvent(const LogEventType,const char *,const char *,
00074 const size_t,const char *,...)
00075 wizard_attribute((format (printf,5,6))),
00076 LogWizardEventList(const LogEventType,const char *,const char *,
00077 const size_t,const char *,va_list)
00078 wizard_attribute((format (printf,5,0)));
00079
00080 extern WizardExport void
00081 CloseWizardLog(void),
00082 LogComponentTerminus(void),
00083 SetLogFormat(const char *),
00084 SetLogPreamble(const char *);
00085
00086 #if defined(__cplusplus) || defined(c_plusplus)
00087 }
00088 #endif
00089
00090 #endif