MagickCore  6.9.12-43
Convert, Edit, Or Compose Bitmap Images
log.h
Go to the documentation of this file.
1 /*
2  Copyright 1999-2021 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)
25 extern "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 
34 typedef enum
35 {
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 
60 typedef struct _LogInfo
61  LogInfo;
62 
63 typedef void
64  (*MagickLogMethod)(const LogEventType,const char *);
65 
66 extern MagickExport char
67  **GetLogList(const char *,size_t *,ExceptionInfo *);
68 
69 extern MagickExport const char
70  *GetLogName(void),
71  *SetLogName(const char *);
72 
73 extern MagickExport const LogInfo
74  **GetLogInfoList(const char *,size_t *,ExceptionInfo *);
75 
77  SetLogEventMask(const char *);
78 
80  IsEventLogging(void) magick_attribute((__pure__)),
81  ListLogInfo(FILE *,ExceptionInfo *),
82  LogComponentGenesis(void),
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)));
87 
88 extern MagickExport void
89  CloseMagickLog(void),
91  SetLogFormat(const char *),
93 
94 #if defined(__cplusplus) || defined(c_plusplus)
95 }
96 #endif
97 
98 #endif
Definition: log.h:40
Definition: log.h:52
MagickExport MagickBooleanType LogMagickEventList(const LogEventType type, const char *module, const char *function, const size_t line, const char *format, va_list operands)
Definition: log.c:1292
Definition: log.h:55
void(* MagickLogMethod)(const LogEventType, const char *)
Definition: log.h:64
Definition: exception.h:102
Definition: log.h:45
LogEventType
Definition: log.h:34
MagickExport MagickBooleanType ListLogInfo(FILE *file, ExceptionInfo *exception)
Definition: log.c:753
Definition: log.h:48
MagickExport LogEventType SetLogEventMask(const char *events)
Definition: log.c:1766
Definition: log.h:57
Definition: log.h:38
MagickExport MagickBooleanType LogComponentGenesis(void)
Definition: log.c:849
MagickExport void LogComponentTerminus(void)
Definition: log.c:905
MagickBooleanType
Definition: magick-type.h:198
MagickExport const LogInfo ** GetLogInfoList(const char *pattern, size_t *number_preferences, ExceptionInfo *exception)
Definition: log.c:484
MagickExport char ** GetLogList(const char *pattern, size_t *number_preferences, ExceptionInfo *exception)
Definition: log.c:577
MagickExport void SetLogFormat(const char *format)
Definition: log.c:1813
Definition: log.c:106
Definition: log.h:43
Definition: log.h:51
MagickExport const char * GetLogName(void)
Definition: log.c:641
MagickExport MagickBooleanType IsEventLogging(void)
Definition: log.c:725
MagickExport void CloseMagickLog(void)
Definition: log.c:356
MagickExport MagickBooleanType LogMagickEvent(const LogEventType type, const char *module, const char *function, const size_t line, const char *format,...)
Definition: log.c:1420
Definition: log.h:41
Definition: log.h:56
Definition: log.h:36
Definition: log.h:47
MagickExport void SetLogMethod(MagickLogMethod method)
Definition: log.c:1854
Definition: log.h:46
Definition: log.h:39
Definition: log.h:53
Definition: log.h:54
Definition: log.h:50
#define magick_attribute(x)
Definition: deprecate.h:41
MagickExport const char * SetLogName(const char *name)
Definition: log.c:1897
Definition: log.h:37
#define MagickExport
Definition: method-attribute.h:80
Definition: log.h:42
Definition: log.h:49
Definition: log.h:44