2 Copyright 1999-2018 ImageMagick Studio LLC, a non-profit organization
3 dedicated to making software imaging solutions freely available.
5 You may not use this file except in compliance with the License.
6 obtain a copy of the License at
8 https://www.imagemagick.org/script/license.php
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
16 MagickCore log methods.
18 #ifndef MAGICKCORE_LOG_H
19 #define MAGICKCORE_LOG_H
21 #include "MagickCore/exception.h"
23 #if defined(__cplusplus) || defined(c_plusplus)
27 #if !defined(GetMagickModule)
28 # define GetMagickModule() __FILE__,__func__,(unsigned long) __LINE__
31 #define MagickLogFilename "log.xml"
35 UndefinedEvents = 0x000000,
37 AccelerateEvent = 0x00001,
38 AnnotateEvent = 0x00002,
42 ConfigureEvent = 0x00020,
43 DeprecateEvent = 0x00040,
45 ExceptionEvent = 0x00100, /* Log Errors and Warnings immediately */
47 LocaleEvent = 0x00400,
48 ModuleEvent = 0x00800, /* Loding of coder and filter modules */
50 PolicyEvent = 0x02000,
51 ResourceEvent = 0x04000,
53 TransformEvent = 0x10000,
55 WandEvent = 0x40000, /* Log MagickWand */
57 CommandEvent = 0x100000, /* Log Command Processing (CLI & Scripts) */
58 AllEvents = 0x7fffffff
61 typedef struct _LogInfo
65 (*MagickLogMethod)(const LogEventType,const char *);
67 extern MagickExport char
68 **GetLogList(const char *,size_t *,ExceptionInfo *);
70 extern MagickExport const char
72 *SetLogName(const char *);
74 extern MagickExport const LogInfo
75 **GetLogInfoList(const char *,size_t *,ExceptionInfo *);
77 extern MagickExport LogEventType
78 SetLogEventMask(const char *);
80 extern MagickExport MagickBooleanType
82 ListLogInfo(FILE *,ExceptionInfo *),
83 LogMagickEvent(const LogEventType,const char *,const char *,const size_t,
84 const char *,...) magick_attribute((__format__ (__printf__,5,6))),
85 LogMagickEventList(const LogEventType,const char *,const char *,const size_t,
86 const char *,va_list) magick_attribute((__format__ (__printf__,5,0)));
88 extern MagickExport void
90 SetLogFormat(const char *),
91 SetLogMethod(MagickLogMethod);
93 #if defined(__cplusplus) || defined(c_plusplus)