_bug0006_transforms 

TB Wiki

Login

Regression Test

Expected HTML for page "DocDebug"


expected html
nothing
t1 t
2<table align="right"><tr><td><div class="toc">
3Contents:
4<ul>
5  <ul>
6    <li><a href="#debug_and_diagnostic_messages">debug&nbsp;and&nbsp;diagnostic&nbsp;messages</a></li>
7    <li><a href="#debug_log">debug&nbsp;log</a></li>
8    <ul>
9      <li><a href="#activating_the_debug_log_from_configuration_file">activating&nbsp;the&nbsp;debug&nbsp;log&nbsp;from&nbsp;configuration&nbsp;file</a></li>
10      <li><a href="#activating_the_debug_log_by_URL">activating&nbsp;the&nbsp;debug&nbsp;log&nbsp;by&nbsp;URL</a></li>
11      <li><a href="#debug_log_extra_string">debug&nbsp;log&nbsp;extra&nbsp;string</a></li>
12    </ul>
13  </ul>
14</ul>
15</div></td></tr></table>
16<p>
17This page describes how to bebug a tbwiki instance.
18<p>
19<h2><a name="debug_and_diagnostic_messages">debug and diagnostic messages</a>
20<span align=right class="section_edit_link">[<a href="/tbwiki/DocDebug?action=edit&section=debug_and_diagnostic_messages">edit section</a>]</font></span>
21</h2>
22Inside the wiki code itself, use <code>req.add_to_message()</code> to show a message
23that will appear in the client browser
24<p>
25<h2><a name="debug_log">debug log</a>
26<span align=right class="section_edit_link">[<a href="/tbwiki/DocDebug?action=edit&section=debug_log">edit section</a>]</font></span>
27</h2>
28tbwiki supports a debug log, which is found at:
29<p>
30<code>req.config.data_dir + "tbwiki-debug.log"</code>
31<p>
32Entries can be added to the debug log by calling the <code>req.debug_log(msg)</code> function.  This can be called from anywhere in tbwiki_engine.py, any
33Macro or Processor, or the associated auxiliary modules (datascan, table, etc.)
34<p>
35<h3><a name="activating_the_debug_log_from_configuration_file">activating the debug log from configuration file</a>
36<span align=right class="section_edit_link">[<a href="/tbwiki/DocDebug?action=edit&section=activating_the_debug_log_from_configuration_file">edit section</a>]</font></span>
37</h3>
38In cgi-bin/&lt;wiki_name&gt;.cgi, set the <code>do_debug</code> variable
39in the config class instance, like so:
40<p>
41<ul><div style="background-color:#ffffe0; padding:5px; border-style: solid solid solid solid; border-width: 1px 1px 1px 1px;">
42<pre>config.do_debug = True</pre></div></ul>
43 
44<p>
45This should be done before calling main(req) in the .cgi file.
46<p>
47<h3><a name="activating_the_debug_log_by_URL">activating the debug log by URL</a>
48<span align=right class="section_edit_link">[<a href="/tbwiki/DocDebug?action=edit&section=activating_the_debug_log_by_URL">edit section</a>]</font></span>
49</h3>
50You can also activate this by adding "?debug=true" to any valid wiki URL.
51<p>
52For example: <a href="https://bird.org/tbwiki/FrontPage?debug=true">https://bird.org/tbwiki/FrontPage?debug=true</a>
53<p>
54<ul><div style="background-color:#ffffe0; padding:5px; border-style: solid solid solid solid; border-width: 1px 1px 1px 1px;">
55<pre>2024-11-04_17:32:42.20 - in main(), action='show'</pre></div></ul>
56 
57<p>
58<h3><a name="debug_log_extra_string">debug log extra string</a>
59<span align=right class="section_edit_link">[<a href="/tbwiki/DocDebug?action=edit&section=debug_log_extra_string">edit section</a>]</font></span>
60</h3>
61If you specify an string for the value of "debug" other than "true",
62then this will  appear in log entries for that URL response.
63<p>
64For example: <a href="https://bird.org/tbwiki/FrontPage?debug=testing_front_page_url">https://bird.org/tbwiki/FrontPage?debug=testing_front_page_url</a>
65<p>
66Results in (at least) the following log entry:
67<ul><div style="background-color:#ffffe0; padding:5px; border-style: solid solid solid solid; border-width: 1px 1px 1px 1px;">
68<pre>2024-11-04_17:32:42.20 - [testing_front_page_url] in main(), action='show'</pre></div></ul>
69 
70<p>
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op

Differences for page "DocDebug"


expected html
generated html
t No Differences Found t No Differences Found 
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op

Update saved output

Back to diff page

Return to Regression_Test page
TBWiki engine 1.9.3 by Tim Bird