| 1 |
<?xml version="1.0" encoding="utf-8"?> |
| 2 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 3 |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
| 4 |
<head> |
| 5 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| 6 |
<meta name="generator" content="Docutils 0.21.2: https://docutils.sourceforge.io/" /> |
| 7 |
<title>blackbox</title> |
| 8 |
<link rel="stylesheet" href="../style.css" type="text/css" /> |
| 9 |
</head> |
| 10 |
<body> |
| 11 |
<div class="document" id="blackbox"> |
| 12 |
<span id="ext-blackbox"></span> |
| 13 |
<h1 class="title">blackbox</h1> |
| 14 |
|
| 15 |
<div class="contents htmlonly topic" id="contents"> |
| 16 |
<p class="topic-title"><a class="reference internal" href="#top">Contents</a></p> |
| 17 |
<ul class="simple"> |
| 18 |
<li><a class="reference internal" href="#description" id="toc-entry-1">Description</a></li> |
| 19 |
<li><a class="reference internal" href="#commands" id="toc-entry-2">Commands</a><ul> |
| 20 |
<li><a class="reference internal" href="#repository-maintenance" id="toc-entry-3">Repository maintenance</a></li> |
| 21 |
</ul> |
| 22 |
</li> |
| 23 |
</ul> |
| 24 |
</div> |
| 25 |
<p>log repository events to a blackbox for debugging</p> |
| 26 |
<div class="section" id="description"> |
| 27 |
<h1><a class="toc-backref" href="#contents">Description</a></h1> |
| 28 |
<p>Logs event information to .hg/blackbox.log to help debug and diagnose problems. |
| 29 |
The events that get logged can be configured via the blackbox.track and |
| 30 |
blackbox.ignore config keys.</p> |
| 31 |
<p>Examples:</p> |
| 32 |
<pre class="literal-block"> |
| 33 |
[blackbox] |
| 34 |
track = * |
| 35 |
ignore = pythonhook |
| 36 |
# dirty is *EXPENSIVE* (slow); |
| 37 |
# each log entry indicates `+` if the repository is dirty, like :hg:`id`. |
| 38 |
dirty = True |
| 39 |
# record the source of log messages |
| 40 |
logsource = True |
| 41 |
|
| 42 |
[blackbox] |
| 43 |
track = command, commandfinish, commandexception, exthook, pythonhook |
| 44 |
|
| 45 |
[blackbox] |
| 46 |
track = incoming |
| 47 |
|
| 48 |
[blackbox] |
| 49 |
# limit the size of a log file |
| 50 |
maxsize = 1.5 MB |
| 51 |
# rotate up to N log files when the current one gets too big |
| 52 |
maxfiles = 3 |
| 53 |
|
| 54 |
[blackbox] |
| 55 |
# Include microseconds in log entries with %f (see Python function |
| 56 |
# datetime.datetime.strftime) |
| 57 |
date-format = %Y-%m-%d @ %H:%M:%S.%f |
| 58 |
</pre> |
| 59 |
</div> |
| 60 |
<div class="section" id="commands"> |
| 61 |
<h1><a class="toc-backref" href="#contents">Commands</a></h1> |
| 62 |
<div class="section" id="repository-maintenance"> |
| 63 |
<h2><a class="toc-backref" href="#contents">Repository maintenance</a></h2> |
| 64 |
<div class="section" id="blackbox-1"> |
| 65 |
<h3>blackbox</h3> |
| 66 |
<p>view the recent repository events:</p> |
| 67 |
<pre class="literal-block"> |
| 68 |
hg blackbox [OPTION]... |
| 69 |
</pre> |
| 70 |
<p>view the recent repository events</p> |
| 71 |
<p>Options:</p> |
| 72 |
<table class="docutils option-list" frame="void" rules="none"> |
| 73 |
<col class="option" /> |
| 74 |
<col class="description" /> |
| 75 |
<tbody valign="top"> |
| 76 |
<tr><td class="option-group" colspan="2"> |
| 77 |
<kbd><span class="option">-l</span>, <span class="option">--limit <var><VALUE></var></span></kbd></td> |
| 78 |
</tr> |
| 79 |
<tr><td> </td><td>the number of events to show (default: 10)</td></tr> |
| 80 |
</tbody> |
| 81 |
</table> |
| 82 |
</div> |
| 83 |
</div> |
| 84 |
</div> |
| 85 |
</div> |
| 86 |
</body> |
| 87 |
</html> |