log

Event logging support

Contents

IsEventLogging

Synopsis

unsigned int IsEventLogging( void );

Description

IsEventLogging() returns True if logging of events is enabled otherwise False.

The format of the IsEventLogging method is:

unsigned int IsEventLogging( void );

LogMagickEvent

Synopsis

MagickPassFail LogMagickEvent( const LogEventType type, const char *module,
                               const char *function, const unsigned long line,
                               const char *format, ... );

Description

LogMagickEvent() logs an event as determined by the log configuration file. If an error occurs, MagickFail is returned otherwise MagickPass.

The format of the LogMagickEvent method is:

MagickPassFail LogMagickEvent( const LogEventType type, const char *module,
                               const char *function, const unsigned long line,
                               const char *format, ... );
type:
The event type.
filename:
The source module filename.
function:
The function name.
line:
The line number of the source module.
format:
The output format.

SetLogEventMask

Synopsis

unsigned long SetLogEventMask( const char *events );

Description

SetLogEventMask() accepts a comma-delimited list that determines which events to log. All other events are ignored. By default, no logging is enabled. This method returns the updated log event mask.

The format of the AcquireString method is:

unsigned long SetLogEventMask( const char *events );

A description of each parameter follows:

events:
log these events.

SetLogFormat

Synopsis

void SetLogFormat( const char *format );

Description

SetLogFormat() sets the format for the "human readable" log record.

The format of the LogMagickFormat method is:

void SetLogFormat( const char *format );

A description of each parameter follows:

format:
The log record format.

SetLogMethod

Synopsis

void SetLogMethod( LogMethod method );

Description

SetLogMethod() sets the method to be called when logging.

The format of the SetLogMethod method is:

void SetLogMethod( LogMethod method );

A description of each parameter follows:

method:
pointer to a method of type LogMethod that will be called when LogMagickEvent is called. Pass a null pointer to remove a registered method.

Copyright © GraphicsMagick Group 2002 - 2020