MagickCore  6.7.5
log.h
Go to the documentation of this file.
00001 /*
00002   Copyright 1999-2012 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.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 #if defined(__cplusplus) || defined(c_plusplus)
00022 extern "C" {
00023 #endif
00024 
00025 #include <stdarg.h>
00026 #include "MagickCore/exception.h"
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 = 0x000000,
00037   NoEvents = 0x00000,
00038   AccelerateEvent = 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   PixelEvent = 0x01000,
00051   PolicyEvent = 0x02000,
00052   ResourceEvent = 0x04000,
00053   TraceEvent = 0x08000,
00054   TransformEvent = 0x10000,
00055   UserEvent = 0x20000,
00056   WandEvent = 0x40000,
00057   X11Event = 0x80000,
00058   AllEvents = 0x7fffffff
00059 } LogEventType;
00060 
00061 typedef struct _LogInfo
00062   LogInfo;
00063 
00064 extern MagickExport char
00065   **GetLogList(const char *,size_t *,ExceptionInfo *);
00066 
00067 extern MagickExport const char
00068   *GetLogName(void),
00069   *SetLogName(const char *);
00070                                                                                 
00071 extern MagickExport const LogInfo
00072   **GetLogInfoList(const char *,size_t *,ExceptionInfo *);
00073 
00074 extern MagickExport LogEventType
00075   SetLogEventMask(const char *);
00076 
00077 extern MagickExport MagickBooleanType
00078   IsEventLogging(void),
00079   ListLogInfo(FILE *,ExceptionInfo *),
00080   LogMagickEvent(const LogEventType,const char *,const char *,const size_t,
00081     const char *,...) 
00082     magick_attribute((format (printf,5,6))),
00083   LogMagickEventList(const LogEventType,const char *,const char *,const size_t,
00084     const char *,va_list) magick_attribute((format (printf,5,0)));
00085 
00086 extern MagickExport void
00087   CloseMagickLog(void),
00088   SetLogFormat(const char *);
00089 
00090 #if defined(__cplusplus) || defined(c_plusplus)
00091 }
00092 #endif
00093 
00094 #endif