# log.h

Go to the documentation of this file.

    00001 /*
    00002   Copyright 1999-2005 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 "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