The debug :: logging module

The debug :: logging module provides functions, constants and global variables for the implementation of a conditional (based on current debug level) output of debuging information to log files.

Required modules

numeric :: core, string :: core, string :: sprintf

Functions

NameDescription

DebugLog()

Outputs debuging information in a log file ...

GetDebugFile()

Gets the filename of the current debug log file used by DebugLog()...

GetDebugMode()

Gets the value of the current debug mode (level). See DebugLog() for further details...

SetDebugFile()

Sets the filename of the current debug log file used by DebugLog()...

SetDebugMode()

Sets the value of the current debug mode (level). See DebugLog() for further details...

Constants

NameDescription

DBG_NODEBUG

SetDebugMode() related constant. Specifies that debug logging (from DebugLog()) will not be performed.

This constant if passed directly to DebugLog() will cause the respective call to always print information to the log file.

DBG_LEVEL_1

SetDebugMode() related constant. Specifies that user level 1 debug logging will be performed.

Pass this constant to DebugLog() calls within your script which print the less detailed level of information to the log file.

DBG_LEVEL_2

SetDebugMode() related constant. Specifies that user level 2 debug logging will be performed.

Pass this constant to DebugLog() calls within your script which print basic to moderately detailed level of information to the log file.

DBG_LEVEL_3

SetDebugMode() related constant. Specifies that user level 3 debug logging will be performed.

Pass this constant to DebugLog() calls within your script which print moderately to detailed level of information to the log file.

DBG_LEVEL_4

SetDebugMode() related constant. Specifies that user level 4 debug logging will be performed.

Pass this constant to DebugLog() calls within your script which print a detailed level of information to the log file.

You can define more user-level constants if desired by succesively adding 1, 2, 3, ..., etc. to this constant.

DBG_LIBRARY

SetDebugMode() related constant. Avisynth libraries and plugins developers should derive their library-specific debug constants by adding to this number an appropriate integer offset (less than DBG_RESERVED - DBG_LIBRARY).

DBG_RESERVED

SetDebugMode() related constant. Debug level values equal or above DBG_RESERVED are reserved for AVSLib's own use. Note: The above scheme may change at the future to allow the user a more granular control of what among different libraries should be logged.

Variables

None