00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 #ifndef _MAGICKCORE_LOG_H
00019 #define _MAGICKCORE_LOG_H
00020 
00021 #if defined(__cplusplus) || defined(c_plusplus)
00022 extern "C" {
00023 #endif
00024 
00025 #include <stdarg.h>
00026 #include "magick/exception.h"
00027 
00028 #if !defined(GetUnadornedModuleName)
00029 # if (((defined(__cplusplus) || defined(c_plusplus)) && defined(HAS_CPP__func__)) || \
00030       (!(defined(__cplusplus) || defined(c_plusplus)) && defined(HAS_C__func__)))
00031 #  define GetUnadornedModuleName() (__func__)
00032 # elif defined(_VISUALC_) && defined(__FUNCTION__)
00033 #  define GetUnadornedModuleName() (__FUNCTION__)
00034 # else
00035 #  define GetUnadornedModuleName() ("unknown")
00036 # endif
00037 #endif
00038 #if !defined(GetMagickModule)
00039 # define GetMagickModule()  \
00040   __FILE__,GetUnadornedModuleName(),(unsigned long) __LINE__
00041 #endif
00042 
00043 #define MagickLogFilename  "log.xml"
00044 
00045 typedef enum
00046 {
00047   UndefinedEvents,
00048   NoEvents = 0x0000,
00049   TraceEvent = 0x0001,
00050   AnnotateEvent = 0x0002,
00051   BlobEvent = 0x0004,
00052   CacheEvent = 0x0008,
00053   CoderEvent = 0x0010,
00054   ConfigureEvent = 0x0020,
00055   DeprecateEvent = 0x0040,
00056   DrawEvent = 0x0080,
00057   ExceptionEvent = 0x0100,
00058   LocaleEvent = 0x0200,
00059   ModuleEvent = 0x0400,
00060   ResourceEvent = 0x0800,
00061   TransformEvent = 0x1000,
00062   UserEvent = 0x2000,
00063   WandEvent = 0x4000,
00064   X11Event = 0x8000,
00065   AllEvents = 0x7fffffff
00066 } LogEventType;
00067 
00068 typedef struct _LogInfo
00069   LogInfo;
00070 
00071 extern MagickExport char
00072   **GetLogList(const char *,unsigned long *,ExceptionInfo *);
00073 
00074 extern MagickExport const char
00075   *GetLogName(void),
00076   *SetLogName(const char *);
00077                                                                                 
00078 extern MagickExport const LogInfo
00079   *GetLogInfo(const char *,ExceptionInfo *),
00080   **GetLogInfoList(const char *,unsigned long *,ExceptionInfo *);
00081 
00082 extern MagickExport LogEventType
00083   SetLogEventMask(const char *);
00084 
00085 extern MagickExport MagickBooleanType
00086   IsEventLogging(void),
00087   ListLogInfo(FILE *,ExceptionInfo *),
00088   LogMagickEvent(const LogEventType,const char *,const char *,
00089     const unsigned long,const char *,...) 
00090     magick_attribute((format (printf,5,6))),
00091   LogMagickEventList(const LogEventType,const char *,const char *,
00092     const unsigned long,const char *,va_list)
00093     magick_attribute((format (printf,5,0)));
00094 
00095 extern MagickExport void
00096   CloseWizardLog(void),
00097   DestroyLogList(void),
00098   SetLogFormat(const char *);
00099 
00100 #if defined(__cplusplus) || defined(c_plusplus)
00101 }
00102 #endif
00103 
00104 #endif