log.h

Go to the documentation of this file.
00001 /*
00002   Copyright 1999-2020 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.  You may
00006   obtain a copy of the License at
00007   
00008     https://imagemagick.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   MagickCore log methods.
00017 */
00018 #ifndef MAGICKCORE_LOG_H
00019 #define MAGICKCORE_LOG_H
00020 
00021 #include "MagickCore/exception.h"
00022 
00023 #if defined(__cplusplus) || defined(c_plusplus)
00024 extern "C" {
00025 #endif
00026 
00027 #if !defined(GetMagickModule)
00028 # define GetMagickModule()  __FILE__,__func__,(unsigned long) __LINE__
00029 #endif
00030 
00031 #define MagickLogFilename  "log.xml"
00032 
00033 typedef enum
00034 {
00035   UndefinedEvents = 0x000000,
00036   NoEvents = 0x00000,
00037   AccelerateEvent = 0x00001,
00038   AnnotateEvent = 0x00002,
00039   BlobEvent = 0x00004,
00040   CacheEvent = 0x00008,
00041   CoderEvent = 0x00010,
00042   ConfigureEvent = 0x00020,
00043   DeprecateEvent = 0x00040,
00044   DrawEvent = 0x00080,
00045   ExceptionEvent = 0x00100,   /* Log Errors and Warnings immediately */
00046   ImageEvent = 0x00200,
00047   LocaleEvent = 0x00400,
00048   ModuleEvent = 0x00800,      /* Log coder and filter modules */
00049   PixelEvent = 0x01000,
00050   PolicyEvent = 0x02000,
00051   ResourceEvent = 0x04000,
00052   TraceEvent = 0x08000,
00053   TransformEvent = 0x10000,
00054   UserEvent = 0x20000,
00055   WandEvent = 0x40000,        /* Log MagickWand */
00056   X11Event = 0x80000,
00057   CommandEvent = 0x100000,    /* Log Command Processing (CLI & Scripts) */
00058   AllEvents = 0x7fffffff
00059 } LogEventType;
00060 
00061 typedef struct _LogInfo
00062   LogInfo;
00063 
00064 typedef void
00065   (*MagickLogMethod)(const LogEventType,const char *);
00066 
00067 extern MagickExport char
00068   **GetLogList(const char *,size_t *,ExceptionInfo *);
00069 
00070 extern MagickExport const char
00071   *GetLogName(void),
00072   *SetLogName(const char *);
00073 
00074 extern MagickExport const LogInfo
00075   **GetLogInfoList(const char *,size_t *,ExceptionInfo *);
00076 
00077 extern MagickExport LogEventType
00078   SetLogEventMask(const char *);
00079 
00080 extern MagickExport MagickBooleanType
00081   IsEventLogging(void) magick_attribute((__pure__)),
00082   ListLogInfo(FILE *,ExceptionInfo *),
00083   LogMagickEvent(const LogEventType,const char *,const char *,const size_t,
00084     const char *,...) magick_attribute((__format__ (__printf__,5,6))),
00085   LogMagickEventList(const LogEventType,const char *,const char *,const size_t,
00086     const char *,va_list) magick_attribute((__format__ (__printf__,5,0)));
00087 
00088 extern MagickExport void
00089   CloseMagickLog(void),
00090   SetLogFormat(const char *),
00091   SetLogMethod(MagickLogMethod);
00092 
00093 #if defined(__cplusplus) || defined(c_plusplus)
00094 }
00095 #endif
00096 
00097 #endif

Generated on 20 Jan 2020 for MagickCore by  doxygen 1.6.1