MagickCore 7.1.1
Convert, Edit, Or Compose Bitmap Images
Loading...
Searching...
No Matches
log.h
1/*
2 Copyright @ 2002 ImageMagick Studio LLC, a non-profit organization
3 dedicated to making software imaging solutions freely available.
4
5 You may not use this file except in compliance with the License. You may
6 obtain a copy of the License at
7
8 https://imagemagick.org/script/license.php
9
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.
15
16 MagickCore log methods.
17*/
18#ifndef MAGICKCORE_LOG_H
19#define MAGICKCORE_LOG_H
20
21#include "MagickCore/exception.h"
22
23#if defined(__cplusplus) || defined(c_plusplus)
24extern "C" {
25#endif
26
27#if !defined(GetMagickModule)
28# define GetMagickModule() __FILE__,__func__,(unsigned long) __LINE__
29#endif
30
31#define MagickLogFilename "log.xml"
32
33typedef enum
34{
35 UndefinedEvents = 0x000000,
36 NoEvents = 0x00000,
37 AccelerateEvent = 0x00001,
38 AnnotateEvent = 0x00002,
39 BlobEvent = 0x00004,
40 CacheEvent = 0x00008,
41 CoderEvent = 0x00010,
42 ConfigureEvent = 0x00020,
43 DeprecateEvent = 0x00040,
44 DrawEvent = 0x00080,
45 ExceptionEvent = 0x00100, /* Log Errors and Warnings immediately */
46 ImageEvent = 0x00200,
47 LocaleEvent = 0x00400,
48 ModuleEvent = 0x00800, /* Log coder and filter modules */
49 PixelEvent = 0x01000,
50 PolicyEvent = 0x02000,
51 ResourceEvent = 0x04000,
52 TraceEvent = 0x08000,
53 TransformEvent = 0x10000,
54 UserEvent = 0x20000,
55 WandEvent = 0x40000, /* Log MagickWand */
56 X11Event = 0x80000,
57 CommandEvent = 0x100000, /* Log Command Processing (CLI & Scripts) */
58 AllEvents = 0x7fffffff
59} LogEventType;
60
61typedef struct _LogInfo
62 LogInfo;
63
64typedef void
65 (*MagickLogMethod)(const LogEventType,const char *);
66
67extern MagickExport char
68 **GetLogList(const char *,size_t *,ExceptionInfo *);
69
70extern MagickExport const char
71 *GetLogName(void) magick_attribute((__pure__)),
72 *SetLogName(const char *);
73
74extern MagickExport LogEventType
75 GetLogEventMask(void) magick_attribute((__pure__));
76
77extern MagickExport const LogInfo
78 **GetLogInfoList(const char *,size_t *,ExceptionInfo *);
79
80extern MagickExport LogEventType
81 SetLogEventMask(const char *);
82
83extern MagickExport MagickBooleanType
84 IsEventLogging(void) magick_attribute((__pure__)),
85 ListLogInfo(FILE *,ExceptionInfo *),
86 LogMagickEvent(const LogEventType,const char *,const char *,const size_t,
87 const char *,...) magick_attribute((__format__ (__printf__,5,6))),
88 LogMagickEventList(const LogEventType,const char *,const char *,const size_t,
89 const char *,va_list) magick_attribute((__format__ (__printf__,5,0)));
90
91extern MagickExport void
92 CloseMagickLog(void),
93 SetLogFormat(const char *),
94 SetLogMethod(MagickLogMethod);
95
96#if defined(__cplusplus) || defined(c_plusplus)
97}
98#endif
99
100#endif