DocDebug

This page describes how to bebug a tbwiki instance.

debug and diagnostic messages [edit section]

Inside the wiki code itself, use req.add_to_message() to show a message that will appear in the client browser

debug log [edit section]

tbwiki supports a debug log, which is found at: req.conf.data_dir + "tbwiki-debug.log"

Entries can be added to the debug log by calling the req.debug_log(msg) function.

activating the debug log from configuration file [edit section]

In cgi-bin/<wiki_name>.cgi, set the do_debug variable in the config class instance, like so:

This should be done before calling main(req) in the .cgi file.

activating the debug log by URL [edit section]

You can also activate this by adding "?debug=true" to any valid wiki URL.

For example: https://bird.org/tbwiki/FrontPage?debug=true

debug log extra string [edit section]

If you specify an string for the value of "debug" other than "true", then this will appear in log entries for that URL response.

For example: https://bird.org/tbwiki/FrontPage?debug=testing_front_page_url

Results in (at least) the following log entry: