MagickCore  7.0.9
log.c File Reference
Include dependency graph for log.c:

Go to the source code of this file.

Data Structures

struct  _EventInfo
 
struct  _HandlerInfo
 
struct  _LogInfo
 
struct  _LogMapInfo
 

Macros

#define LogFilename   "log.xml"
 
#define MegabytesToBytes(value)   ((MagickSizeType) (value)*1024*1024)
 

Typedefs

typedef struct _EventInfo EventInfo
 
typedef struct _HandlerInfo HandlerInfo
 
typedef struct _LogMapInfo LogMapInfo
 

Enumerations

enum  LogHandlerType {
  UndefinedHandler = 0x0000, NoHandler = 0x0000, ConsoleHandler = 0x0001, StdoutHandler = 0x0002,
  StderrHandler = 0x0004, FileHandler = 0x0008, DebugHandler = 0x0010, EventHandler = 0x0020,
  MethodHandler = 0x0040
}
 

Functions

static LogHandlerType ParseLogHandlers (static MagickBooleanTypeIsLogCacheInstantiated(ExceptionInfo *) magick_attribute((__pure__)) const char *)
 
MagickExport void CloseMagickLog (void)
 
static LogInfoGetLogInfo (const char *name, ExceptionInfo *exception)
 
static int LogInfoCompare (const void *x, const void *y)
 
MagickExport const LogInfo ** GetLogInfoList (const char *pattern, size_t *number_preferences, ExceptionInfo *exception)
 
static int LogCompare (const void *x, const void *y)
 
MagickExport char ** GetLogList (const char *pattern, size_t *number_preferences, ExceptionInfo *exception)
 
MagickExport const char * GetLogName (void)
 
static void CheckEventLogging ()
 
static MagickBooleanType IsLogCacheInstantiated (ExceptionInfo *exception)
 
MagickExport MagickBooleanType IsEventLogging (void)
 
MagickExport MagickBooleanType ListLogInfo (FILE *file, ExceptionInfo *exception)
 
MagickPrivate MagickBooleanType LogComponentGenesis (void)
 
static void * DestroyLogElement (void *log_info)
 
MagickPrivate void LogComponentTerminus (void)
 
static char * TranslateEvent (const char *module, const char *function, const size_t line, const char *domain, const char *event)
 
static char * TranslateFilename (const LogInfo *log_info)
 
MagickExport MagickBooleanType LogMagickEventList (const LogEventType type, const char *module, const char *function, const size_t line, const char *format, va_list operands)
 
MagickExport MagickBooleanType LogMagickEvent (const LogEventType type, const char *module, const char *function, const size_t line, const char *format,...)
 
static MagickBooleanType LoadLogCache (LinkedListInfo *cache, const char *xml, const char *filename, const size_t depth, ExceptionInfo *exception)
 
static LogHandlerType ParseLogHandlers (const char *handlers)
 
MagickExport LogEventType SetLogEventMask (const char *events)
 
MagickExport void SetLogFormat (const char *format)
 
MagickExport void SetLogMethod (MagickLogMethod method)
 
MagickExport const char * SetLogName (const char *name)
 

Variables

static const HandlerInfo LogHandlers [32]
 
static const LogMapInfo LogMap []
 
static char log_name [MagickPathExtent] = "Magick"
 
static LinkedListInfolog_cache = (LinkedListInfo *) NULL
 
static MagickBooleanType event_logging = MagickFalse
 
static SemaphoreInfolog_semaphore = (SemaphoreInfo *) NULL
 

Macro Definition Documentation

#define LogFilename   "log.xml"

Definition at line 73 of file log.c.

Referenced by IsLogCacheInstantiated().

#define MegabytesToBytes (   value)    ((MagickSizeType) (value)*1024*1024)

Typedef Documentation

typedef struct _EventInfo EventInfo
typedef struct _HandlerInfo HandlerInfo
typedef struct _LogMapInfo LogMapInfo

Enumeration Type Documentation

Enumerator
UndefinedHandler 
NoHandler 
ConsoleHandler 
StdoutHandler 
StderrHandler 
FileHandler 
DebugHandler 
EventHandler 
MethodHandler 

Definition at line 78 of file log.c.

Function Documentation

static void CheckEventLogging ( )
inlinestatic
static void* DestroyLogElement ( void *  log_info)
static
MagickExport const char* GetLogName ( void  )

Definition at line 636 of file log.c.

References log_name.

Referenced by TranslateEvent(), and TranslateFilename().

static MagickBooleanType IsLogCacheInstantiated ( ExceptionInfo exception)
static
static int LogCompare ( const void *  x,
const void *  y 
)
static

Definition at line 557 of file log.c.

References LocaleCompare().

Referenced by GetLogList().

MagickPrivate MagickBooleanType LogComponentGenesis ( void  )
static int LogInfoCompare ( const void *  x,
const void *  y 
)
static

Definition at line 462 of file log.c.

References LocaleCompare().

Referenced by GetLogInfoList().

MagickExport MagickBooleanType LogMagickEvent ( const LogEventType  type,
const char *  module,
const char *  function,
const size_t  line,
const char *  format,
  ... 
)

Definition at line 1413 of file log.c.

References IsEventLogging(), LogMagickEventList(), and MagickFalse.

Referenced by AcquireImage(), AcquireImageColormap(), AcquireMagickInfo(), AcquireMagickResource(), AcquireNextImage(), AcquireResampleFilter(), AcquireResizeFilter(), AcquireUniqueFileResource(), AcquireVirtualCacheView(), AdaptiveBlurImage(), AdaptiveSharpenImage(), AdaptiveThresholdImage(), AddNoiseImage(), AddPathToXMLTree(), AffineTransformImage(), AnimateImages(), AnnotateImage(), AppendImageFormat(), AppendImages(), AppendImageToList(), Ascii85Flush(), AttachBlob(), AttachCustomStream(), AutoThresholdImage(), Base64Decode(), Base64Encode(), BilevelImage(), BlackThresholdImage(), BlobToFile(), BlobToImage(), BlueShiftImage(), BlurImage(), BorderImage(), BrightnessContrastImage(), CannyEdgeImage(), CatchImageException(), ChannelFxImage(), CharcoalImage(), ChopImage(), CLAHEImage(), ClampImage(), ClassifyImageColors(), ClipImagePath(), ClipPixelCacheNexus(), CloneCacheView(), CloneImage(), CloneImageArtifacts(), CloneImageOptions(), CloneImageProfiles(), CloneImageProperties(), CloneImages(), ClonePixelCache(), ClonePixelCacheMethods(), ClonePixelCacheRepository(), CloneSplayTree(), CloseBlob(), ClutImage(), CoalesceImages(), ColorDecisionListImage(), ColorizeImage(), ColorMatrixImage(), CombineImages(), CompareImages(), CompareImagesLayers(), ComplexImages(), CompositeImage(), CompositeLayers(), CompressImageColormap(), ConnectedComponentsImage(), ConsolidateCMYKImages(), ConstituteImage(), ContrastImage(), ContrastStretchImage(), CopyImagePixels(), CropImage(), CropImageToTiles(), CustomStreamToImage(), CycleColormapImage(), DecipherImage(), DeleteImageArtifact(), DeleteImageOption(), DeleteImageProfile(), DeleteImageProperty(), DeleteImageRegistry(), DeleteImages(), DeleteNodeByValueFromSplayTree(), DeleteNodeFromSplayTree(), DeskewImage(), DespeckleImage(), DestroyBlob(), DestroyCacheView(), DestroyCustomStreamInfo(), DestroyDrawInfo(), DestroyImage(), DestroyImageArtifacts(), DestroyImageInfo(), DestroyImageList(), DestroyImageOptions(), DestroyImagePixelCache(), DestroyImagePixels(), DestroyImageProperties(), DestroyLocaleOptions(), DestroyMontageInfo(), DestroyPixelCache(), DestroyPixelStream(), DestroyQuantizeInfo(), DestroyRandomInfo(), DestroyResampleFilter(), DestroySignatureInfo(), DestroyStreamInfo(), DestroyTokenInfo(), DestroyXMLTree(), DestroyXMLTreeRoot(), DetachBlob(), DisassociateBlob(), DisassociateImageStream(), DisplayImages(), DisposeImages(), DistortImage(), DistortResizeImage(), DrawAffineImage(), DrawClippingMask(), DrawCompositeMask(), DrawDashPolygon(), DrawGradientImage(), DrawPatternPath(), DrawPolygonPrimitive(), DrawPrimitive(), DrawStrokePolygon(), DuplicateBlob(), DuplicateImages(), EdgeImage(), EmbossImage(), EncipherImage(), EnhanceImage(), EOFBlob(), EqualizeImage(), ErrorBlob(), EvaluateImage(), EvaluateImages(), ExcerptImage(), ExpandFilenames(), ExportImagePixels(), ExportQuantumPixels(), ExtentImage(), FileToBlob(), FileToImage(), FileToString(), FileToStringInfo(), FinalizeSignature(), FlipImage(), FloodfillPaintImage(), FlopImage(), FrameImage(), FunctionImage(), FxImage(), GammaImage(), GaussianBlurImage(), GetAffineMatrix(), GetAuthenticMetacontentFromStream(), GetAuthenticPixelsFromStream(), GetAuthenticPixelsStream(), GetBlobError(), GetBlobProperties(), GetBlobSize(), GetBlobStreamHandler(), GetCacheViewColorspace(), GetCacheViewExtent(), GetCacheViewImage(), GetCacheViewStorageClass(), GetCoderInfoList(), GetCoderList(), GetColorInfoList(), GetColorList(), GetColorTuple(), GetConfigureInfoList(), GetConfigureList(), GetConfigureOption(), GetConfigureOptions(), GetConfigurePaths(), GetConfigureValue(), GetDelegateCommand(), GetDelegateCommands(), GetDelegateInfoList(), GetDelegateList(), GetDelegateMode(), GetDelegateThreadSupport(), GetDrawInfo(), GetEdgeBoundingBox(), GetImageAlphaChannel(), GetImageArtifact(), GetImageBoundingBox(), GetImageColorspaceType(), GetImageDepth(), GetImageDistortion(), GetImageDistortions(), GetImageDynamicThreshold(), GetImageEntropy(), GetImageExtent(), GetImageExtrema(), GetImageFeatures(), GetImageFromList(), GetImageInfo(), GetImageKurtosis(), GetImageListLength(), GetImageMagick(), GetImageMask(), GetImageMean(), GetImageMoments(), GetImageOption(), GetImageProfile(), GetImageProperty(), GetImageQuantizeError(), GetImageRange(), GetImageReferenceCount(), GetImageRegistry(), GetImageStatistics(), GetImageTotalInkDensity(), GetImageVirtualPixelMethod(), GetLocaleInfoList(), GetLocaleList(), GetLocaleOptions(), GetLocaleValue(), GetLocationStatistics(), GetLogInfoList(), GetLogList(), GetMagicInfoList(), GetMagickInfoList(), GetMagickList(), GetMagickPrecision(), GetMagickProperty(), GetMagickPropertyLetter(), GetMagicList(), GetMagicName(), GetMimeDescription(), GetMimeInfoList(), GetMimeList(), GetMimeType(), GetMontageInfo(), GetMotionBlurKernel(), GetMultilineTypeMetrics(), GetNextImageArtifact(), GetNextImageInList(), GetNextImageOption(), GetNextImageProfile(), GetNextImageProperty(), GetNextImageRegistry(), GetNextKeyInSplayTree(), GetNextValueInSplayTree(), GetNextXMLTreeTag(), GetNumberOfNodesInSplayTree(), GetOptimalKernelWidth1D(), GetOptimalKernelWidth2D(), GetPageGeometry(), GetPathComponent(), GetPixelCacheColorspace(), GetPixelCacheStorageClass(), GetPixelCacheTileSize(), GetPolicyInfoList(), GetPolicyList(), GetPolicyValue(), GetQuantizeInfo(), GetQuantumType(), GetRootValueFromSplayTree(), GetSignatureBlocksize(), GetSignatureDigest(), GetSignatureDigestsize(), GetThresholdMapFile(), GetTypeInfoList(), GetTypeList(), GetTypeMetrics(), GetValueFromSplayTree(), GetVirtualMetacontentFromStream(), GetVirtualPixelsStream(), GetVirtualPixelStream(), GetXMLTreeAttribute(), GetXMLTreeAttributes(), GetXMLTreeChild(), GetXMLTreeContent(), GetXMLTreeOrdered(), GetXMLTreePath(), GetXMLTreeProcessingInstructions(), GetXMLTreeSibling(), GetXMLTreeTag(), GradientImage(), GrayscaleImage(), HaldClutImage(), HoughLineImage(), HuffmanDecodeImage(), HuffmanEncodeImage(), Hull(), IdentifyImage(), IdentifyImageGray(), IdentifyImageMonochrome(), IdentifyImageType(), IdentifyPaletteImage(), ImageListToArray(), ImagesToBlob(), ImagesToCustomStream(), ImageToBlob(), ImageToCustomStream(), ImageToFile(), ImplodeImage(), ImportImagePixels(), ImportQuantumPixels(), InitializeSignature(), InjectImageBlob(), InsertImageInList(), InterpolativeResizeImage(), InterpretDelegateProperties(), InterpretImageProperties(), InverseFourierTransformImage(), InvokeDelegate(), InvokeDynamicImageFilter(), IsBlobExempt(), IsBlobSeekable(), IsBlobTemporary(), IsEquivalentImage(), IsHighDynamicRangeImage(), IsHistogramImage(), IsImageObject(), IsImageOpaque(), IsPaletteImage(), IsRightsAuthorized(), IsTaintImage(), KuwaharaImage(), LevelImage(), LevelImageColors(), LevelizeImage(), LiquidRescaleImage(), ListFiles(), ListThresholdMapFile(), LoadColorCache(), LoadConfigureCache(), LoadDelegateCache(), LoadLocaleCache(), LoadMimeCache(), LoadPolicyCache(), LoadTypeCache(), LocalContrastImage(), LogPathInfo(), LogPixelChannels(), LogPolygonInfo(), LogPrimitiveInfo(), LZWEncodeImage(), MagnifyImage(), MaskPixelCacheNexus(), MeanShiftImage(), MergeImageLayers(), MinifyImage(), ModifyImage(), ModulateImage(), MontageImageList(), MorphImages(), MotionBlurImage(), NegateImage(), NewMagickImage(), OilPaintImage(), OpaquePaintImage(), OpenBlob(), OpenPixelCache(), OptimizeImageTransparency(), OptimizeLayerFrames(), OrderedDitherImage(), PackbitsEncodeImage(), ParseMetaGeometry(), PasskeyDecipherImage(), PasskeyEncipherImage(), PerceptibleImage(), PersistPixelCache(), PingBlob(), PingImage(), PingImages(), PlasmaImage(), PolaroidImage(), PolynomialImage(), PosterizeImage(), PreviewImage(), ProfileImage(), PruneTagFromXMLTree(), QuantizeImage(), QuantizeImages(), QueryColorCompliance(), RaiseImage(), RandomThresholdImage(), RangeThresholdImage(), ReadImage(), ReadImages(), ReadPixelCacheMetacontent(), ReadPixelCachePixels(), ReadStream(), ReferenceBlob(), ReferenceImage(), RegisterMagickInfo(), RegisterMagickSignalHandler(), RegistryComponentTerminus(), RelinquishMagickResource(), RelinquishUniqueFileResource(), RemapImage(), RemapImages(), RemoteDisplayCommand(), RemoveDuplicateLayers(), RemoveFirstImageFromList(), RemoveImageArtifact(), RemoveImageFromList(), RemoveImageOption(), RemoveImageProfile(), RemoveImageProperty(), RemoveImageRegistry(), RemoveLastImageFromList(), RemoveNodeByValueFromSplayTree(), RemoveNodeFromSplayTree(), RemoveZeroDelayLayers(), RenderMVGContent(), RenderPostscript(), ReplaceImageInList(), ReplaceImageInListReturnLast(), ResampleImage(), ResetImageArtifactIterator(), ResetImageOptionIterator(), ResetImageOptions(), ResetImagePage(), ResetImagePixels(), ResetImageProfileIterator(), ResetImagePropertyIterator(), ResetImageRegistryIterator(), ResetSplayTree(), ResetSplayTreeIterator(), ResizeImage(), ReverseImageList(), RollImage(), RotateImage(), RotationalBlurImage(), SampleImage(), ScaleImage(), SeekBlob(), SegmentImage(), SelectiveBlurImage(), SeparateImage(), SeparateImages(), SepiaToneImage(), SetBlobExempt(), SetBlobExtent(), SetCacheAlphaChannel(), SetCacheViewStorageClass(), SetCacheViewVirtualPixelMethod(), SetClientName(), SetClientPath(), SetGeometry(), SetGeometryInfo(), SetImageAlpha(), SetImageAlphaChannel(), SetImageArtifact(), SetImageBackgroundColor(), SetImageColor(), SetImageColorspace(), SetImageDepth(), SetImageGray(), SetImageInfo(), SetImageInfoBlob(), SetImageInfoCustomStream(), SetImageInfoFile(), SetImageMask(), SetImageMonochrome(), SetImageOption(), SetImageProfileInternal(), SetImageProperty(), SetImageRegionMask(), SetImageRegistry(), SetImageStorageClass(), SetImageType(), SetImageVirtualPixelMethod(), SetMagickPrecision(), SetPixelCacheExtent(), SetPixelCacheMethods(), SetPixelCacheVirtualMethod(), SetPixelChannelMask(), SetQuantumDepth(), SetQuantumEndian(), SetQuantumFormat(), SetQuantumImageType(), SetQuantumPad(), SetResampleFilterInterpolateMethod(), SetResampleFilterVirtualPixelMethod(), SetXMLTreeAttribute(), SetXMLTreeContent(), ShadeImage(), ShadowImage(), SharpenImage(), ShaveImage(), ShearImage(), ShearRotateImage(), ShredFile(), SigmoidalContrastImage(), SignatureImage(), SimilarityImage(), SmushImages(), SolarizeImage(), SortColormapByIntensity(), SparseColorImage(), SpliceImage(), SpliceImageIntoList(), SpreadImage(), sRGBTransformImage(), StatisticImage(), SteganoImage(), StereoAnaglyphImage(), StreamImage(), StreamImagePixels(), StripImage(), SwirlImage(), SyncAuthenticPixelsStream(), SyncBlob(), SyncImage(), SyncImageSettings(), SyncImagesSettings(), TellBlob(), TextureImage(), ThrowMagickExceptionList(), ThumbnailImage(), TintImage(), TransformImage(), TransformImageColorspace(), TransformsRGBImage(), TransparentPaintImage(), TransparentPaintImageChroma(), TransposeImage(), TransverseImage(), TrimImage(), UnsharpMaskImage(), VignetteImage(), WaveImage(), WaveletDenoiseImage(), WhiteThresholdImage(), WriteImage(), WriteImages(), WritePixelCacheMetacontent(), WritePixelCachePixels(), WriteStream(), XImportImage(), XMLTreeInfoToXML(), XShearImage(), YShearImage(), and ZLIBEncodeImage().

static LogHandlerType ParseLogHandlers ( const char *  handlers)
static

Definition at line 1694 of file log.c.

References LocaleNCompare(), LogHandlers, _HandlerInfo::name, NoHandler, and UndefinedHandler.

MagickExport const char* SetLogName ( const char *  name)

Definition at line 1884 of file log.c.

References CopyMagickString(), log_name, and MagickPathExtent.

Variable Documentation

MagickBooleanType event_logging = MagickFalse
static

Definition at line 217 of file log.c.

Referenced by CheckEventLogging(), IsEventLogging(), and LogComponentTerminus().

char log_name[MagickPathExtent] = "Magick"
static

Definition at line 211 of file log.c.

Referenced by GetLogName(), and SetLogName().

const HandlerInfo LogHandlers[32]
static

Definition at line 167 of file log.c.

Referenced by ListLogInfo(), and ParseLogHandlers().

const LogMapInfo LogMap[]
static
Initial value:
=
{
{ NoEvents, ConsoleHandler, "Magick-%g.log",
"%t %r %u %v %d %c[%p]: %m/%f/%l/%d\\n %e" }
}
Definition: log.h:36

Definition at line 204 of file log.c.

Referenced by ParseLogHandlers().