MagickCore  7.0.7
Convert, Edit, Or Compose Bitmap Images
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 (const char *)
 
static LogInfoGetLogInfo (const char *, ExceptionInfo *)
 
static MagickBooleanType IsLogCacheInstantiated (ExceptionInfo *)
 
static MagickBooleanType LoadLogCache (LinkedListInfo *, const char *, const char *, const size_t, ExceptionInfo *)
 
static LinkedListInfoAcquireLogCache (const char *filename, ExceptionInfo *exception)
 
MagickExport void CloseMagickLog (void)
 
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 ()
 
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,...)
 
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 SemaphoreInfoevent_semaphore = (SemaphoreInfo *) NULL
 
static SemaphoreInfolog_semaphore = (SemaphoreInfo *) NULL
 

Macro Definition Documentation

◆ LogFilename

#define LogFilename   "log.xml"

Definition at line 72 of file log.c.

Referenced by IsLogCacheInstantiated().

◆ MegabytesToBytes

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

Typedef Documentation

◆ EventInfo

typedef struct _EventInfo EventInfo

◆ HandlerInfo

typedef struct _HandlerInfo HandlerInfo

◆ LogMapInfo

typedef struct _LogMapInfo LogMapInfo

Enumeration Type Documentation

◆ LogHandlerType

Enumerator
UndefinedHandler 
NoHandler 
ConsoleHandler 
StdoutHandler 
StderrHandler 
FileHandler 
DebugHandler 
EventHandler 
MethodHandler 

Definition at line 77 of file log.c.

Function Documentation

◆ AcquireLogCache()

◆ CheckEventLogging()

static void CheckEventLogging ( )
inlinestatic

◆ CloseMagickLog()

◆ DestroyLogElement()

static void* DestroyLogElement ( void *  log_info)
static

◆ GetLogInfo()

◆ GetLogInfoList()

◆ GetLogList()

◆ GetLogName()

MagickExport const char* GetLogName ( void  )

Definition at line 633 of file log.c.

References log_name.

Referenced by TranslateEvent(), and TranslateFilename().

◆ IsEventLogging()

◆ IsLogCacheInstantiated()

static MagickBooleanType IsLogCacheInstantiated ( ExceptionInfo exception)
static

◆ ListLogInfo()

◆ LoadLogCache()

◆ LogCompare()

static int LogCompare ( const void *  x,
const void *  y 
)
static

Definition at line 554 of file log.c.

References LocaleCompare().

Referenced by GetLogList().

◆ LogComponentGenesis()

◆ LogComponentTerminus()

◆ LogInfoCompare()

static int LogInfoCompare ( const void *  x,
const void *  y 
)
static

Definition at line 459 of file log.c.

References LocaleCompare().

Referenced by GetLogInfoList().

◆ LogMagickEvent()

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

Definition at line 1397 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(), ClampImage(), ClassifyImageColors(), ClipImagePath(), 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(), DrawClipPath(), DrawDashPolygon(), DrawGradientImage(), DrawImage(), DrawPatternPath(), DrawPolygonPrimitive(), DrawPrimitive(), DrawStrokePolygon(), DuplicateBlob(), DuplicateImages(), EdgeImage(), EmbossImage(), EncipherImage(), EnhanceImage(), EOFBlob(), EqualizeImage(), 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(), GetImageAlphaChannel(), GetImageArtifact(), GetImageBoundingBox(), 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(), LoadCoderCache(), LoadColorCache(), LoadConfigureCache(), LoadDelegateCache(), LoadLocaleCache(), LoadMagicCache(), LoadMimeCache(), LoadPolicyCache(), LoadTypeCache(), LocalContrastImage(), LogPathInfo(), LogPixelChannels(), LogPolygonInfo(), LogPrimitiveInfo(), LZWEncodeImage(), MagnifyImage(), 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(), 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(), RenderPostscript(), RenderType(), ReplaceImageInList(), ReplaceImageInListReturnLast(), ResampleImage(), ResetImageArtifactIterator(), ResetImageOptionIterator(), ResetImageOptions(), ResetImagePage(), ResetImageProfileIterator(), ResetImagePropertyIterator(), ResetImageRegistryIterator(), ResetSplayTree(), ResetSplayTreeIterator(), ResizeImage(), ReverseImageList(), RollImage(), RotateImage(), RotationalBlurImage(), SampleImage(), ScaleImage(), SeekBlob(), SegmentImage(), SelectiveBlurImage(), SeparateImage(), SeparateImages(), SepiaToneImage(), SetBlobExempt(), SetBlobExtent(), SetCacheAlphaChannel(), SetCacheViewStorageClass(), SetCacheViewVirtualPixelMethod(), 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().

◆ LogMagickEventList()

◆ ParseLogHandlers()

static LogHandlerType ParseLogHandlers ( const char *  handlers)
static

Definition at line 1678 of file log.c.

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

Referenced by LoadLogCache().

◆ SetLogEventMask()

◆ SetLogFormat()

◆ SetLogMethod()

◆ SetLogName()

MagickExport const char* SetLogName ( const char *  name)

Definition at line 1868 of file log.c.

References CopyMagickString(), log_name, and MagickPathExtent.

◆ TranslateEvent()

◆ TranslateFilename()

Variable Documentation

◆ event_logging

MagickBooleanType event_logging = MagickFalse
static

Definition at line 213 of file log.c.

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

◆ event_semaphore

SemaphoreInfo* event_semaphore = (SemaphoreInfo *) NULL
static

Definition at line 216 of file log.c.

Referenced by LogComponentGenesis(), LogComponentTerminus(), and LogMagickEventList().

◆ log_cache

◆ log_name

char log_name[MagickPathExtent] = "Magick"
static

Definition at line 207 of file log.c.

Referenced by GetLogName(), and SetLogName().

◆ log_semaphore

◆ LogHandlers

const HandlerInfo LogHandlers[32]
static

Definition at line 163 of file log.c.

Referenced by ListLogInfo(), and ParseLogHandlers().

◆ LogMap

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 200 of file log.c.

Referenced by AcquireLogCache().