UnitTestSingleBoldWord >> _bug0002 >> FixthisList >> TestTables >> Table_Architecture 

TB Wiki

Login

DocDebug in split format

{{TableOfContents}}
This page describes how to bebug a tbwiki instance.
This page describes how to bebug a tbwiki instance.

debug and diagnostic messages [edit section]

== debug and diagnostic messages ==Inside the wiki code itself, use ``req.add_to_message()`` to show a messagethat will appear in the client browser

debug log [edit section]

== debug log ==tbwiki supports a debug log, which is found at:``req.config.data_dir + "tbwiki-debug.log"``
Entries can be added to the debug log by calling the req.debug_log(msg) function. This can be called from anywhere in tbwiki_engine.py, anyMacro or Processor, or the associated auxiliary modules (datascan, table, etc.)
Entries can be added to the debug log by calling the ``req.debug_log(msg)`` function.  This can be called from anywhere in tbwiki_engine.py, anyMacro or Processor, or the associated auxiliary modules (datascan, table, etc.)

activating the debug log from configuration file [edit section]

=== activating the debug log from configuration file ===In cgi-bin/<wiki_name>.cgi, set the ``do_debug`` variablein the config class instance, like so:
{{{#!YellowBoxconfig.do_debug = True}}}
This should be done before calling main(req) in the .cgi file.
This should be done before calling main(req) in the .cgi file.

activating the debug log by URL [edit section]

=== activating the debug log by URL ===You can also activate this by adding "?debug=true" to any valid wiki URL.
For example: https://bird.org/tbwiki/FrontPage?debug=true
For example: https://bird.org/tbwiki/FrontPage?debug=true
{{{#!YellowBox2024-11-04_17:32:42.20 - in main(), action='show'}}}

debug log extra string [edit section]

=== debug log extra string ===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
For example: https://bird.org/tbwiki/FrontPage?debug=testing_front_page_url
Results in (at least) the following log entry:{{{#!YellowBox2024-11-04_17:32:42.20 - [testing_front_page_url] in main(), action='show'}}}
Results in (at least) the following log entry:{{{#!YellowBox2024-11-04_17:32:42.20 - [testing_front_page_url] in main(), action='show'}}}
TBWiki engine 1.9.3 by Tim Bird