cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1 | /* |
cristy | 16af1cb | 2009-12-11 21:38:29 +0000 | [diff] [blame] | 2 | Copyright 1999-2010 ImageMagick Studio LLC, a non-profit organization |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3 | 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) |
| 22 | extern "C" { |
| 23 | #endif |
| 24 | |
| 25 | #include <stdarg.h> |
| 26 | #include "magick/exception.h" |
| 27 | |
| 28 | #if !defined(GetMagickModule) |
cristy | 6aa47ad | 2010-05-28 19:32:32 +0000 | [diff] [blame] | 29 | # define GetMagickModule() __FILE__,__func__,(unsigned long) __LINE__ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 30 | #endif |
| 31 | |
| 32 | #define MagickLogFilename "log.xml" |
| 33 | |
| 34 | typedef 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 | LocaleEvent = 0x00200, |
| 48 | ModuleEvent = 0x00400, |
| 49 | PolicyEvent = 0x00800, |
| 50 | ResourceEvent = 0x01000, |
| 51 | TransformEvent = 0x02000, |
| 52 | UserEvent = 0x04000, |
| 53 | WandEvent = 0x08000, |
| 54 | X11Event = 0x10000, |
| 55 | AllEvents = 0x7fffffff |
| 56 | } LogEventType; |
| 57 | |
| 58 | typedef struct _LogInfo |
| 59 | LogInfo; |
| 60 | |
| 61 | extern MagickExport char |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 62 | **GetLogList(const char *,size_t *,ExceptionInfo *); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 63 | |
| 64 | extern MagickExport const char |
| 65 | *GetLogName(void), |
| 66 | *SetLogName(const char *); |
| 67 | |
| 68 | extern MagickExport const LogInfo |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 69 | **GetLogInfoList(const char *,size_t *,ExceptionInfo *); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 70 | |
| 71 | extern MagickExport LogEventType |
| 72 | SetLogEventMask(const char *); |
| 73 | |
| 74 | extern MagickExport MagickBooleanType |
| 75 | IsEventLogging(void), |
| 76 | ListLogInfo(FILE *,ExceptionInfo *), |
cristy | f34a145 | 2009-10-24 22:29:27 +0000 | [diff] [blame] | 77 | LogComponentGenesis(void), |
cristy | 5ed838e | 2010-05-31 00:05:35 +0000 | [diff] [blame^] | 78 | LogMagickEvent(const LogEventType,const char *,const char *,const size_t, |
| 79 | const char *,...) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 80 | magick_attribute((format (printf,5,6))), |
cristy | 5ed838e | 2010-05-31 00:05:35 +0000 | [diff] [blame^] | 81 | LogMagickEventList(const LogEventType,const char *,const char *,const size_t, |
| 82 | const char *,va_list) magick_attribute((format (printf,5,0))); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 83 | |
| 84 | extern MagickExport void |
| 85 | CloseMagickLog(void), |
cristy | f34a145 | 2009-10-24 22:29:27 +0000 | [diff] [blame] | 86 | LogComponentTerminus(void), |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 87 | SetLogFormat(const char *); |
| 88 | |
| 89 | #if defined(__cplusplus) || defined(c_plusplus) |
| 90 | } |
| 91 | #endif |
| 92 | |
| 93 | #endif |