github.com/kaydxh/golang@v0.0.131/pkg/gocv/cgo/third_path/graphics-magick/include/GraphicsMagick/magick/log.h (about) 1 /* 2 Copyright (C) 2003 - 2020 GraphicsMagick Group 3 Copyright (C) 2002 ImageMagick Studio 4 5 This program is covered by multiple licenses, which are described in 6 Copyright.txt. You should have received a copy of Copyright.txt with this 7 package; otherwise see http://www.graphicsmagick.org/www/Copyright.html. 8 9 Log methods. 10 */ 11 #ifndef _MAGICK_LOG_H 12 #define _MAGICK_LOG_H 13 14 #if defined(__cplusplus) || defined(c_plusplus) 15 extern "C" { 16 #endif 17 18 /* 19 Define declarations. 20 */ 21 #define MagickLogFilename "log.mgk" 22 23 /* 24 Obtain the current C function name (if possible) 25 */ 26 # if !defined(GetCurrentFunction) 27 # if (((defined(__cplusplus) || defined(c_plusplus)) && defined(HAS_CPP__func__)) || \ 28 (!(defined(__cplusplus) || defined(c_plusplus)) && defined(HAS_C__func__))) 29 # define GetCurrentFunction() (__func__) 30 # elif defined(_VISUALC_) && defined(__FUNCTION__) 31 # define GetCurrentFunction() (__FUNCTION__) 32 # else 33 # define GetCurrentFunction() ("unknown") 34 # endif 35 # endif 36 37 /* 38 Obtain current source file, function name, and source file line, 39 in a form acceptable for use with LogMagickEvent. 40 */ 41 # if !defined(GetMagickModule) 42 # define GetMagickModule() __FILE__,GetCurrentFunction(),__LINE__ 43 # endif 44 45 46 /* NOTE: any changes to this effect PerlMagick */ 47 typedef enum 48 { 49 UndefinedEventMask = 0x00000000, 50 NoEventsMask = 0x00000000, 51 ConfigureEventMask = 0x00000001, 52 AnnotateEventMask = 0x00000002, 53 RenderEventMask = 0x00000004, 54 TransformEventMask = 0x00000008, 55 LocaleEventMask = 0x00000010, 56 CoderEventMask = 0x00000020, 57 X11EventMask = 0x00000040, 58 CacheEventMask = 0x00000080, 59 BlobEventMask = 0x00000100, 60 DeprecateEventMask = 0x00000200, 61 UserEventMask = 0x00000400, 62 ResourceEventMask = 0x00000800, 63 TemporaryFileEventMask = 0x00001000, 64 /* ExceptionEventMask = WarningEventMask | ErrorEventMask | FatalErrorEventMask */ 65 ExceptionEventMask = 0x00070000, 66 OptionEventMask = 0x00004000, 67 InformationEventMask = 0x00008000, 68 WarningEventMask = 0x00010000, 69 ErrorEventMask = 0x00020000, 70 FatalErrorEventMask = 0x00040000, 71 AllEventsMask = 0x7FFFFFFF 72 } LogEventType; 73 74 typedef void 75 (*LogMethod)(const ExceptionType,const char *); 76 77 /* 78 Method declarations. 79 */ 80 extern MagickExport MagickBool 81 IsEventLogging(void) MAGICK_FUNC_PURE, 82 LogMagickEvent(const ExceptionType type, 83 const char *module,const char *function,const unsigned long line, 84 const char *format,...) MAGICK_ATTRIBUTE((__format__ (__printf__,5,6))), 85 LogMagickEventList(const ExceptionType type, 86 const char *module,const char *function,const unsigned long line, 87 const char *format,va_list operands) MAGICK_ATTRIBUTE((__format__ (__printf__,5,0))); 88 89 extern MagickExport unsigned long 90 SetLogEventMask(const char *events); 91 92 extern MagickExport void 93 SetLogFormat(const char *format), 94 SetLogMethod(LogMethod); 95 96 #if defined(MAGICK_IMPLEMENTATION) 97 # include "magick/log-private.h" 98 #endif /* MAGICK_IMPLEMENTATION */ 99 100 #if defined(__cplusplus) || defined(c_plusplus) 101 } 102 #endif 103 104 #endif /* _MAGICK_LOG_H */ 105 106 /* 107 * Local Variables: 108 * mode: c 109 * c-basic-offset: 2 110 * fill-column: 78 111 * End: 112 */