blob: 156e36d8e4e9840501a72dfb00092bceb87ab6d3 [file] [log] [blame]
cristy3ed852e2009-09-05 21:47:34 +00001/*
cristy7e41fe82010-12-04 23:12:08 +00002 Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization
cristy3ed852e2009-09-05 21:47:34 +00003 dedicated to making software imaging solutions freely available.
4
5 You may not use this file except in compliance with the License.
6 obtain a copy of the License at
7
8 http://www.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#if defined(__cplusplus) || defined(c_plusplus)
22extern "C" {
23#endif
24
25#include <stdarg.h>
cristy4c08aed2011-07-01 19:47:50 +000026#include "MagickCore/exception.h"
cristy3ed852e2009-09-05 21:47:34 +000027
28#if !defined(GetMagickModule)
cristy0ae68f32010-06-04 00:40:15 +000029# define GetMagickModule() __FILE__,__func__,(unsigned long) __LINE__
cristy3ed852e2009-09-05 21:47:34 +000030#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,
cristy7eb1b7a2010-06-26 15:47:49 +000047 ImageEvent = 0x00200,
48 LocaleEvent = 0x00400,
49 ModuleEvent = 0x00800,
cristy6dcb9b82011-10-23 23:21:25 +000050 PixelEvent = 0x01000,
51 PolicyEvent = 0x02000,
52 ResourceEvent = 0x04000,
53 TransformEvent = 0x08000,
54 UserEvent = 0x10000,
55 WandEvent = 0x20000,
56 X11Event = 0x40000,
cristy3ed852e2009-09-05 21:47:34 +000057 AllEvents = 0x7fffffff
58} LogEventType;
59
60typedef struct _LogInfo
61 LogInfo;
62
63extern MagickExport char
cristybb503372010-05-27 20:51:26 +000064 **GetLogList(const char *,size_t *,ExceptionInfo *);
cristy3ed852e2009-09-05 21:47:34 +000065
66extern MagickExport const char
67 *GetLogName(void),
68 *SetLogName(const char *);
69
70extern MagickExport const LogInfo
cristybb503372010-05-27 20:51:26 +000071 **GetLogInfoList(const char *,size_t *,ExceptionInfo *);
cristy3ed852e2009-09-05 21:47:34 +000072
73extern MagickExport LogEventType
74 SetLogEventMask(const char *);
75
76extern MagickExport MagickBooleanType
77 IsEventLogging(void),
78 ListLogInfo(FILE *,ExceptionInfo *),
cristy5ed838e2010-05-31 00:05:35 +000079 LogMagickEvent(const LogEventType,const char *,const char *,const size_t,
80 const char *,...)
cristy3ed852e2009-09-05 21:47:34 +000081 magick_attribute((format (printf,5,6))),
cristy5ed838e2010-05-31 00:05:35 +000082 LogMagickEventList(const LogEventType,const char *,const char *,const size_t,
83 const char *,va_list) magick_attribute((format (printf,5,0)));
cristy3ed852e2009-09-05 21:47:34 +000084
85extern MagickExport void
86 CloseMagickLog(void),
cristy3ed852e2009-09-05 21:47:34 +000087 SetLogFormat(const char *);
88
89#if defined(__cplusplus) || defined(c_plusplus)
90}
91#endif
92
93#endif