Event logging support
Contents
MagickBool IsEventLogging( void );
IsEventLogging() returns MagickTrue if logging of events is enabled, otherwise MagickFalse. This can be used to enable logging code which is otherwise not needed.
The format of the IsEventLogging method is:
MagickBool IsEventLogging( void );
MagickBool IsEventLogged( const ExceptionType type );
IsEventLogged() returns MagickTrue if logging of events for the specified exception type is enabled, otherwise MagickFalse. This can be used to enable logging code which is otherwise not needed.
The format of the IsEventLogging method is:
MagickBool IsEventLogged( const ExceptionType type );
MagickPassFail LogMagickEvent( const LogEventType type, const char *module, const char *function, const unsigned long line, const char *format, ... );
LogMagickEvent() logs an event as determined by the current logging configuration. 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, ... );
The event type.
The source module filename.
The function name.
The line number of the source module.
The output format.
void SetLogDefaultEventType( const char *events );
SetLogDefaultEventType() accepts a comma-delimited list (Annotate, Blob, Cache, Coder, Configure, Deprecate, Error, Exception, FatalError, Information, Locale, Option, Render, Resource, TemporaryFile, Transform, User, Warning, or X11) that determines the default set of events to log. All other events are ignored. By default, no logging is enabled.
This function should be called prior to InitializeMagick() since it provides defaults used by InitializeMagick() while the logging system is initialized. The events may be modified later after InitializeMagick() has been called using the SetLogEventMask() function.
The format of SetLogDefaultEventType method is:
void SetLogDefaultEventType( const char *events );
A description of each parameter follows:
Comma-separated list of events to report.
void SetLogDefaultGenerations( const unsigned long generations );
SetLogDefaultGenerations() specifies the maximum number of log files to maintain before circulating back to overwrite the first name.
This function should be called prior to InitializeMagick() since it provides defaults used by InitializeMagick() while the logging system is initialized.
The format of SetLogDefaultGenerations method is:
void SetLogDefaultGenerations( const unsigned long generations );
A description of each parameter follows:
Number of log files to maintain before circulating back to the first name.
void SetLogDefaultLimit( const unsigned long limit );
SetLogDefaultLimit() specifies the maximum number of logging events which may occur before creating a new log file.
This function should be called prior to InitializeMagick() since it provides defaults used by InitializeMagick() while the logging system is initialized.
The format of SetLogDefaultLimit method is:
void SetLogDefaultLimit( const unsigned long limit );
A description of each parameter follows:
Maximum number of logging events before creating a new log file.
void SetLogDefaultLogMethod( const LogMethod method );
SetLogDefaultLogMethod() provides a call-back function to be invoked for each log event when the logging method type is MethodOutput. This call-back function is supported when MethodOutput is enabled in the log output type. MethodOutput is automatically enabled if a call-back function is provided, and disabled if the call-back function is NULL.
This function should be called prior to InitializeMagick() since it provides defaults used by InitializeMagick() while the logging system is initialized.
The format of SetLogDefaultLogMethod method is:
void SetLogDefaultLogMethod( const LogMethod method );
A description of each parameter follows:
Call-back function to be invoked for each log event.
void SetLogDefaultOutputType( const LogOutputType output_type );
SetLogDefaultOutputType() sets the logging output destination.
This function should be called prior to InitializeMagick() since it provides defaults used by InitializeMagick() while the logging system is initialized.
The format of SetLogDefaultOutputType method is:
void SetLogDefaultOutputType( const LogOutputType output_type );
A description of each parameter follows:
The logging output destination. One of the enumerated values of LogOutputType.
void SetLogDefaultFileName( const char *filename );
SetLogDefaultFileName() provides the file name, or file path, to be written to for each log event. Place a %d in the file name in order to support multiple log generations. This setting is only used when the log output type uses an output file.
This function should be called prior to InitializeMagick() since it provides defaults used by InitializeMagick() while the logging system is initialized.
The format of SetLogDefaultFileName method is:
void SetLogDefaultFileName( const char *filename );
A description of each parameter follows:
File name, or file path to write log output to.
unsigned long SetLogEventMask( const char *events );
SetLogEventMask() accepts a comma-delimited list (Annotate, Blob, Cache, Coder, Configure, Deprecate, Error, Exception, FatalError, Information, Locale, Option, Render, Resource, TemporaryFile, Transform, User, Warning, or X11) 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 SetLogEventMask method is:
unsigned long SetLogEventMask( const char *events );
A description of each parameter follows:
log these events.
void SetLogFormat( const char *format );
SetLogFormat() sets the format for the "human readable" log record. The format specification supports these special format characters:
%d domain, %e event, %f function, %l line, %m module, %p process ID, %r real CPU time, %t wall clock time, %u user CPU time, %% percent sign, n newline, r carriage return
The format of the LogMagickFormat method is:
void SetLogFormat( const char *format );
A description of each parameter follows:
The log record format.
void SetLogMethod( LogMethod method );
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:
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 - 2023