MagickCore 6.9.13
Loading...
Searching...
No Matches
log.h
1/*
2 Copyright 1999 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 <stdarg.h>
22#include "magick/exception.h"
23
24#if defined(__cplusplus) || defined(c_plusplus)
25extern "C" {
26#endif
27
28#if !defined(GetMagickModule)
29# define GetMagickModule() __FILE__,__func__,(unsigned long) __LINE__
30#endif
31
32#define MagickLogFilename "log.xml"
33
34typedef enum
35{
36 UndefinedEvents,
37 NoEvents = 0x00000,
38 TraceEvent = 0x00001,
39 AnnotateEvent = 0x00002,
40 BlobEvent = 0x00004,
41 CacheEvent = 0x00008,
42 CoderEvent = 0x00010,
43 ConfigureEvent = 0x00020,
44 DeprecateEvent = 0x00040,
45 DrawEvent = 0x00080,
46 ExceptionEvent = 0x00100,
47 ImageEvent = 0x00200,
48 LocaleEvent = 0x00400,
49 ModuleEvent = 0x00800,
50 PolicyEvent = 0x01000,
51 ResourceEvent = 0x02000,
52 TransformEvent = 0x04000,
53 UserEvent = 0x09000,
54 WandEvent = 0x10000,
55 X11Event = 0x20000,
56 AccelerateEvent = 0x40000,
57 AllEvents = 0x7fffffff
58} LogEventType;
59
60typedef struct _LogInfo
61 LogInfo;
62
63typedef void
64 (*MagickLogMethod)(const LogEventType,const char *);
65
66extern const MagickExport LogInfo
67 **GetLogInfoList(const char *,size_t *,ExceptionInfo *);
68
69extern MagickExport char
70 **GetLogList(const char *,size_t *,ExceptionInfo *);
71
72extern MagickExport char
73 *GetLogName(void) magick_attribute((__pure__)),
74 *SetLogName(const char *);
75
76extern MagickExport LogEventType
77 GetLogEventMask(void) magick_attribute((__pure__));
78
79extern MagickExport LogEventType
80 SetLogEventMask(const char *);
81
82extern MagickExport MagickBooleanType
83 IsEventLogging(void) magick_attribute((__pure__)),
84 ListLogInfo(FILE *,ExceptionInfo *),
85 LogComponentGenesis(void),
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 LogComponentTerminus(void),
94 SetLogFormat(const char *),
95 SetLogMethod(MagickLogMethod);
96
97#if defined(__cplusplus) || defined(c_plusplus)
98}
99#endif
100
101#endif