DocDebug
This page describes how to bebug a tbwiki instance.
debug and diagnostic messages [edit section]
Inside the wiki code itself, usereq.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 thedo_debug
variable
in the config class instance, like so:
config.do_debug = True
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
2024-11-04_17:32:42.20 - in main(), action='show'
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:
2024-11-04_17:32:42.20 - [testing_front_page_url] in main(), action='show'