|
WizardsToolkit
1.0.7
|
00001 /* 00002 Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization 00003 dedicated to making software imaging solutions freely available. 00004 00005 You may not use this file except in compliance with the License. 00006 obtain a copy of the License at 00007 00008 http://www.wizards-toolkit.org/script/license.php 00009 00010 Unless required by applicable law or agreed to in writing, software 00011 distributed under the License is distributed on an "AS IS" BASIS, 00012 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 See the License for the specific language governing permissions and 00014 limitations under the License. 00015 00016 Wizard's Toolkit log methods. 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