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 <stdarg.h>
00022 #include "magick/exception.h"
00023 
00024 #if defined(__cplusplus) || defined(c_plusplus)
00025 extern "C" {
00026 #endif
00027 
00028 #if !defined(GetMagickModule)
00029 # define GetMagickModule()  __FILE__,__func__,(unsigned long) __LINE__
00030 #endif
00031 
00032 #define MagickLogFilename  "log.xml"
00033 
00034 typedef enum
00035 {
00036   UndefinedEvents,
00037   NoEvents = 0x00000,
00038   TraceEvent = 0x00001,
00039   AnnotateEvent = 0x00002,
00040   BlobEvent = 0x00004,
00041   CacheEvent = 0x00008,
00042   CoderEvent = 0x00010,
00043   ConfigureEvent = 0x00020,
00044   DeprecateEvent = 0x00040,
00045   DrawEvent = 0x00080,
00046   ExceptionEvent = 0x00100,
00047   ImageEvent = 0x00200,
00048   LocaleEvent = 0x00400,
00049   ModuleEvent = 0x00800,
00050   PolicyEvent = 0x01000,
00051   ResourceEvent = 0x02000,
00052   TransformEvent = 0x04000,
00053   UserEvent = 0x09000,
00054   WandEvent = 0x10000,
00055   X11Event = 0x20000,
00056   AccelerateEvent = 0x40000,
00057   AllEvents = 0x7fffffff
00058 } LogEventType;
00059 
00060 typedef struct _LogInfo
00061   LogInfo;
00062 
00063 typedef void
00064   (*MagickLogMethod)(const LogEventType,const char *);
00065 
00066 extern MagickExport char
00067   **GetLogList(const char *,size_t *,ExceptionInfo *);
00068 
00069 extern MagickExport const char
00070   *GetLogName(void),
00071   *SetLogName(const char *);
00072 
00073 extern MagickExport const LogInfo
00074   **GetLogInfoList(const char *,size_t *,ExceptionInfo *);
00075 
00076 extern MagickExport LogEventType
00077   SetLogEventMask(const char *);
00078 
00079 extern MagickExport MagickBooleanType
00080   IsEventLogging(void) magick_attribute((__pure__)),
00081   ListLogInfo(FILE *,ExceptionInfo *),
00082   LogComponentGenesis(void),
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   LogComponentTerminus(void),
00091   SetLogFormat(const char *),
00092   SetLogMethod(MagickLogMethod);
00093 
00094 #if defined(__cplusplus) || defined(c_plusplus)
00095 }
00096 #endif
00097 
00098 #endif

Generated on 18 May 2020 for MagickCore by  doxygen 1.6.1