Dongle/DebugPrint API

Dongle provides very basic debug and print utility functions to its objects. These come in a number of flavors, detailed below.
This API was introduced with Dongle-1.0
==DongleObject:EnableDebug(level[, frame])==
Enables debugging for DongleObject at level, output being sent to frame.
===Arguments===
* level (number) - The debug level to enable. Any messages <= to this level will be displayed.
* frame (table) - The chat frame to send the output to. This can be any object with an "AddMessage" method, in all actuality.
==DongleObject:IsDebugEnabled()==
===Returns===
* debugLevel - The current debugLevel of the DongleObject or nil.
* debugFrame - The current debugFrame of the DongleObject or nil.
==DongleObject:Print(msg, ...)==
Sends the message to the debug chat frame (or DEFAULT_CHAT_FRAME). If extra arguments are supplied, the arguments are all tostring()'d and concatenated together with comma separators.
===Arguments===
* msg (string, boolean, table, function, thread, userdata) - The object to print
* ... - Any amount of objects to be printed, including nil
==DongleObject:PrintF(msg, ...)==
Sends the formatted message to the debug chat frame (or DEFAULT_CHAT_FRAME). This function expects a format string, and potentially a number of arguments.
===Arguments===
* msg (string) - The string to pass to string.format()
* ... - The arguments to be passed to string.format()
==DongleObject:Debug(level, ...)==
Sends the debug message to the debug chat frame (or DEFAULT_CHAT_FRAME). If extra arguments are supplied, the arguments are all tostring()'d and concatenated together with comma separators. Message is only printed if level is <= the DongleObject's current debugLevel.
===Arguments===
* level (number) - The level of message to send
* ... - Any amount of objects to be printed, including nil
==DongleObject:DebugF(level, msg, ...)==
Sends the formatted debug message to the debug chat frame (or DEFAULT_CHAT_FRAME). This function expects a format string, and potentially a number of arguments. Message is only printed if level is <= the DongleObject's current debugLevel.
===Arguments===
* level (number) - The level of message to send
* msg (string) - The string to pass to string.format()
* ... - The arguments to be passed to string.format()
Category:Dongle