Trac is being migrated to new services! Issues can be found in our new
YouTrack instance and WIKI pages can be found on our
website.
- Timestamp:
-
Apr 15, 2012, 7:15:07 AM (12 years ago)
- Author:
-
QuLogic
- Comment:
-
Fix doxygen links
Legend:
- Unmodified
- Added
- Removed
- Modified
-
v3
|
v4
|
|
10 | 10 | |
11 | 11 | == Debug Levels == |
12 | | The documentation for the [/doxygen/dev/html/debug_8h.html debug.h] header file shows an enumeration listing each of the 6 debug levels defined. Only the last five are typically used when writing debug messages, leaving `PURPLE_DEBUG_ALL` primarily for the UI's use. |
| 12 | The documentation for the [/doxygen/dev2.x.y/html/debug_8h.html debug.h] header file shows an enumeration listing each of the 6 debug levels defined. Only the last five are typically used when writing debug messages, leaving `PURPLE_DEBUG_ALL` primarily for the UI's use. |
13 | 13 | |
14 | | The other debugging levels are fairly straightforward, and I'll leave it to you to read the [/doxygen/dev/html/debug_8h.html#e4789d7a365e1d70da6f232248a08259 enum's documentation] for the brief descriptions. For the most part we're going to want to use `PURPLE_DEBUG_MISC` and `PURPLE_DEBUG_INFO` for plugin messages, but there are obviously situations in which we'll need other levels. |
| 14 | The other debugging levels are fairly straightforward, and I'll leave it to you to read the [/doxygen/dev2.x.y/html/debug_8h.html#e4789d7a365e1d70da6f232248a08259 enum's documentation] for the brief descriptions. For the most part we're going to want to use `PURPLE_DEBUG_MISC` and `PURPLE_DEBUG_INFO` for plugin messages, but there are obviously situations in which we'll need other levels. |
15 | 15 | |
16 | 16 | == Using the Debug Functions == |
17 | | If you browse the [/doxygen/dev/html/debug_8h.html debug.h] doxygen documentation further, you will see that all of the debug functions provided show a `...` for their final parameter. This means that the function is a variadic function, which can take a variable number of parameters. These functions are defined as such because they behave like the standard library's `printf()` function in many ways. You will see the evidence of this once we show the actual source of the plugin. |
| 17 | If you browse the [/doxygen/dev2.x.y/html/debug_8h.html debug.h] doxygen documentation further, you will see that all of the debug functions provided show a `...` for their final parameter. This means that the function is a variadic function, which can take a variable number of parameters. These functions are defined as such because they behave like the standard library's `printf()` function in many ways. You will see the evidence of this once we show the actual source of the plugin. |
18 | 18 | |
19 | 19 | You will also notice that the functions take a category parameter. The category makes it easy to tell what generated each specific debug message when reading the debug log. You can use pretty much anything you want here, but for the purposes of demonstration, we're going to stick with the plugin ID for the category. The recommended best practice is to use the plugin's ID or static name. |
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!