mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-12-04 23:15:07 +00:00
Deployed 67dea287 with MkDocs version: 1.6.1
This commit is contained in:
@@ -3289,7 +3289,7 @@ control this trade-off on the <code>dl</code> command:</p>
|
|||||||
<tr>
|
<tr>
|
||||||
<td><code>debug_requests</code></td>
|
<td><code>debug_requests</code></td>
|
||||||
<td><code>false</code></td>
|
<td><code>false</code></td>
|
||||||
<td>Log HTTP requests to the console with <code>-d</code>, and each request with its response body to the <a href="../troubleshooting/#debug-requests">JSON debug log</a>. The log then holds tokens and content keys as received.</td>
|
<td>Log HTTP requests to the console with <code>-d</code>, each request to the <a href="../troubleshooting/#debug-requests">JSON debug log</a>, and the request and response bodies as files in a folder beside it. The folder holds tokens and content keys as sent and received.</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -1033,6 +1033,17 @@
|
|||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="md-nav__item">
|
||||||
|
<a href="#the-body-folder" class="md-nav__link">
|
||||||
|
<span class="md-ellipsis">
|
||||||
|
|
||||||
|
The body folder
|
||||||
|
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
@@ -2279,6 +2290,17 @@
|
|||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="md-nav__item">
|
||||||
|
<a href="#the-body-folder" class="md-nav__link">
|
||||||
|
<span class="md-ellipsis">
|
||||||
|
|
||||||
|
The body folder
|
||||||
|
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
@@ -2451,7 +2473,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<hr />
|
<hr />
|
||||||
<h2 id="the-structured-json-debug-log">The structured JSON debug log<a class="headerlink" href="#the-structured-json-debug-log" title="Permanent link">¶</a></h2>
|
<h2 id="the-structured-json-debug-log">The structured JSON debug log<a class="headerlink" href="#the-structured-json-debug-log" title="Permanent link">¶</a></h2>
|
||||||
<p>Beyond the console output, unshackle writes a structured log in <a href="https://jsonlines.org/">JSON Lines</a> format: one complete JSON object per line. You can filter, examine, and analyse this file with standard tooling (<code>jq</code>, <code>grep</code>, a text editor). It is safe to attach to a bug report, because unshackle redacts it, unless <code>debug_requests</code> is on (see <a href="#debug-requests">Debugging HTTP traffic</a>).</p>
|
<p>Beyond the console output, unshackle writes a structured log in <a href="https://jsonlines.org/">JSON Lines</a> format: one complete JSON object per line. You can filter, examine, and analyse this file with standard tooling (<code>jq</code>, <code>grep</code>, a text editor). It is safe to attach to a bug report, because unshackle redacts it.</p>
|
||||||
<h3 id="where-it-is-written">Where it is written<a class="headerlink" href="#where-it-is-written" title="Permanent link">¶</a></h3>
|
<h3 id="where-it-is-written">Where it is written<a class="headerlink" href="#where-it-is-written" title="Permanent link">¶</a></h3>
|
||||||
<p>unshackle makes the debug log during a <code>dl</code> run, and during <a href="../cli-reference/#import"><code>import</code></a>, which wraps <code>dl</code>. The path is:</p>
|
<p>unshackle makes the debug log during a <code>dl</code> run, and during <a href="../cli-reference/#import"><code>import</code></a>, which wraps <code>dl</code>. The path is:</p>
|
||||||
<div class="language-text highlight"><pre><span></span><code><span id="__span-3-1"><a id="__codelineno-3-1" name="__codelineno-3-1" href="#__codelineno-3-1"></a><logs directory>/unshackle_debug_<service>_<timestamp>.jsonl
|
<div class="language-text highlight"><pre><span></span><code><span id="__span-3-1"><a id="__codelineno-3-1" name="__codelineno-3-1" href="#__codelineno-3-1"></a><logs directory>/unshackle_debug_<service>_<timestamp>.jsonl
|
||||||
@@ -2548,10 +2570,10 @@
|
|||||||
<p class="admonition-title">Keys are sensitive, turn this back off</p>
|
<p class="admonition-title">Keys are sensitive, turn this back off</p>
|
||||||
<p><code>debug_keys</code> writes real content keys into the log file in cleartext. Only enable it while you diagnose a content key problem. Never share a log written with it on, and set it back to <code>false</code> when you are done. Note that <code>debug_keys</code> only affects the <strong>JSON debug log file</strong>. It does not change what the console prints.</p>
|
<p><code>debug_keys</code> writes real content keys into the log file in cleartext. Only enable it while you diagnose a content key problem. Never share a log written with it on, and set it back to <code>false</code> when you are done. Note that <code>debug_keys</code> only affects the <strong>JSON debug log file</strong>. It does not change what the console prints.</p>
|
||||||
</div>
|
</div>
|
||||||
<p>Fields that are <em>always</em> redacted regardless of <code>debug_keys</code> (anything whose name contains <code>password</code>, <code>token</code>, <code>secret</code>, <code>auth</code>, or <code>cookie</code>) stay masked, so credentials never leak even in a keys-on log. The <code>http_request</code> entries of <a href="#debug-requests"><code>debug_requests</code></a> are the exception.</p>
|
<p>Fields that are <em>always</em> redacted regardless of <code>debug_keys</code> (anything whose name contains <code>password</code>, <code>token</code>, <code>secret</code>, <code>auth</code>, or <code>cookie</code>) stay masked, so credentials never leak even in a keys-on log.</p>
|
||||||
<hr />
|
<hr />
|
||||||
<h2 id="debug-requests">Debugging HTTP traffic with <code>debug_requests</code><a class="headerlink" href="#debug-requests" title="Permanent link">¶</a></h2>
|
<h2 id="debug-requests">Debugging HTTP traffic with <code>debug_requests</code><a class="headerlink" href="#debug-requests" title="Permanent link">¶</a></h2>
|
||||||
<p><code>debug_requests</code> does two things: it keeps the HTTP library logs in the console, and it writes a record of each HTTP request to the JSON debug log.</p>
|
<p><code>debug_requests</code> does two things. It keeps the HTTP library logs in the console, and it writes a record of each HTTP request to the JSON debug log, with the request and response bodies as files in a separate folder.</p>
|
||||||
<h3 id="http-library-logs-in-the-console">HTTP library logs in the console<a class="headerlink" href="#http-library-logs-in-the-console" title="Permanent link">¶</a></h3>
|
<h3 id="http-library-logs-in-the-console">HTTP library logs in the console<a class="headerlink" href="#http-library-logs-in-the-console" title="Permanent link">¶</a></h3>
|
||||||
<p>When you pass <code>-d</code>, unshackle raises its own modules to <code>DEBUG</code> but deliberately <strong>silences</strong> the noisy low-level HTTP libraries (<code>urllib3</code>, <code>requests</code>, <code>rnet</code>, <code>httpx</code>, <code>httpcore</code>, <code>hpack</code>, <code>h2</code>) back down to <code>WARNING</code>. Without this, a single download would bury the useful output under thousands of connection-pool and HTTP/2 frame messages.</p>
|
<p>When you pass <code>-d</code>, unshackle raises its own modules to <code>DEBUG</code> but deliberately <strong>silences</strong> the noisy low-level HTTP libraries (<code>urllib3</code>, <code>requests</code>, <code>rnet</code>, <code>httpx</code>, <code>httpcore</code>, <code>hpack</code>, <code>h2</code>) back down to <code>WARNING</code>. Without this, a single download would bury the useful output under thousands of connection-pool and HTTP/2 frame messages.</p>
|
||||||
<p>Sometimes a request fails at the TLS or connection layer, and you need the underlying library's own logs. If you need that low-level traffic, enable <code>debug_requests</code>:</p>
|
<p>Sometimes a request fails at the TLS or connection layer, and you need the underlying library's own logs. If you need that low-level traffic, enable <code>debug_requests</code>:</p>
|
||||||
@@ -2565,7 +2587,8 @@
|
|||||||
<p>Without <code>-d</code> (verbose console logging), unshackle shows no HTTP library logs. Combine them: <code>unshackle -d dl ...</code> with <code>debug_requests: true</code> in config.</p>
|
<p>Without <code>-d</code> (verbose console logging), unshackle shows no HTTP library logs. Combine them: <code>unshackle -d dl ...</code> with <code>debug_requests: true</code> in config.</p>
|
||||||
</div>
|
</div>
|
||||||
<h3 id="request-records-in-the-json-debug-log">Request records in the JSON debug log<a class="headerlink" href="#request-records-in-the-json-debug-log" title="Permanent link">¶</a></h3>
|
<h3 id="request-records-in-the-json-debug-log">Request records in the JSON debug log<a class="headerlink" href="#request-records-in-the-json-debug-log" title="Permanent link">¶</a></h3>
|
||||||
<p><code>debug_requests</code> is the one switch that writes request records to the <a href="#the-structured-json-debug-log">JSON debug log</a>. With <code>debug_requests: true</code> and the JSON debug log on (<code>-d</code> or <code>debug: true</code>), unshackle writes one <code>http_request</code> entry for each HTTP attempt. With <code>debug_requests: false</code>, the default, a <code>-d</code> run writes no <code>http_request</code> entry. A request that unshackle retries gives one entry for each attempt. A redirect gives one entry for each hop.</p>
|
<p><code>debug_requests</code> is the one switch that writes request records. With <code>debug_requests: true</code> and the JSON debug log on (<code>-d</code> or <code>debug: true</code>), unshackle writes one <code>http_request</code> entry to the <a href="#the-structured-json-debug-log">JSON debug log</a> for each HTTP attempt, and the bodies to files in a separate <a href="#the-body-folder">body folder</a>. With <code>debug_requests: false</code>, the default, a <code>-d</code> run writes no <code>http_request</code> entry and no body folder. A request that unshackle retries gives one entry for each attempt. A redirect gives one entry for each hop.</p>
|
||||||
|
<p>An <code>http_request</code> entry has no body, only the name of its body file, and unshackle redacts it like each other entry of the JSON debug log (see <a href="#what-gets-redacted">What gets redacted</a>). A secret query value such as <code>access_token=SECRET</code> becomes <code>access_token=***</code>. The host and the path stay readable.</p>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -2584,19 +2607,19 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>request.path</code></td>
|
<td><code>request.path</code></td>
|
||||||
<td>The URL path, as sent.</td>
|
<td>The URL path.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>request.query</code></td>
|
<td><code>request.query</code></td>
|
||||||
<td>The query string, as sent.</td>
|
<td>The query string, with the secret values masked.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>request.attempt</code></td>
|
<td><code>request.attempt</code></td>
|
||||||
<td>The attempt number, from 1.</td>
|
<td>The attempt number, from 1.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>request.body</code></td>
|
<td><code>request.body_file</code></td>
|
||||||
<td>The body of a JSON, form, XML or <code>text/*</code> request, as sent. A JSON body is an object. A binary body is not recorded.</td>
|
<td>The name of the file in the body folder that holds the request body.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>response.status</code></td>
|
<td><code>response.status</code></td>
|
||||||
@@ -2604,23 +2627,19 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>response.size</code></td>
|
<td><code>response.size</code></td>
|
||||||
<td>The <code>Content-Length</code> of the response. When the server sent none, the length of the recorded body, else <code>null</code>.</td>
|
<td>The <code>Content-Length</code> of the response. When the server sent none, the length of the body that unshackle read, else <code>null</code>.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>response.body</code></td>
|
<td><code>response.body_file</code></td>
|
||||||
<td>The text response body, as received. A JSON body is a JSON object, so <code>jq</code> can query it. Other text is a string.</td>
|
<td>The name of the file in the body folder that holds the response body.</td>
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><code>response.body_size</code></td>
|
|
||||||
<td>The full size of the decoded body in bytes, when unshackle cut it to <code>debug_requests_body_limit</code>. <code>response.size</code> is the size on the wire, which can be compressed.</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>response.body_error</code></td>
|
<td><code>response.body_error</code></td>
|
||||||
<td>The failure, when unshackle could not read the body.</td>
|
<td>The failure, when unshackle could not read the body. <code>request.body_error</code> is the same for a request body.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>response.body_cut</code></td>
|
<td><code>body_size</code>, <code>body_cut</code></td>
|
||||||
<td><code>true</code> when unshackle cut the body. A cut JSON body is a string.</td>
|
<td>In <code>request</code> or <code>response</code>: the full size of the body in bytes and <code>true</code>, when unshackle cut its file to <code>debug_requests_body_limit</code>.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>duration_ms</code></td>
|
<td><code>duration_ms</code></td>
|
||||||
@@ -2632,18 +2651,29 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<p>unshackle records the body of a JSON, XML or <code>text/*</code> response. It records no body for a manifest (MPD, M3U8 or ISM, by its content type, or by the suffix of the request path when the response is not JSON), a binary content type, an event stream, a request sent with <code>stream=True</code>, or a server process. A request body is recorded by the same rule, by the request <code>Content-Type</code>; a form body counts as text. The entries contain no headers. Core writes no entry for the media requests that it makes. These are the segment and range-probe requests of a track download, and the init segment, index and probe reads before it. A range read that service code makes still writes an entry. Playlist and manifest fetches write an entry.</p>
|
<p>The redaction finds a secret query value by the name of its parameter. An id or a token inside the URL path stays in the entry, and so does the value of a query parameter with a name that the redaction does not know.</p>
|
||||||
|
<p>Core writes no entry for the media requests that it makes. These are the segment and range-probe requests of a track download, and the init segment, index and probe reads before it. A range read that service code makes still writes an entry. Playlist and manifest fetches write an entry.</p>
|
||||||
<div class="language-console highlight"><pre><span></span><code><span id="__span-10-1"><a id="__codelineno-10-1" name="__codelineno-10-1" href="#__codelineno-10-1"></a><span class="go">jq 'select(.operation == "http_request") | [.request.method, .request.host, .request.path, .response.status]' \</span>
|
<div class="language-console highlight"><pre><span></span><code><span id="__span-10-1"><a id="__codelineno-10-1" name="__codelineno-10-1" href="#__codelineno-10-1"></a><span class="go">jq 'select(.operation == "http_request") | [.request.method, .request.host, .request.path, .response.status]' \</span>
|
||||||
</span><span id="__span-10-2"><a id="__codelineno-10-2" name="__codelineno-10-2" href="#__codelineno-10-2"></a><span class="go"> unshackle_debug_EXAMPLE_20260703-142530.jsonl</span>
|
</span><span id="__span-10-2"><a id="__codelineno-10-2" name="__codelineno-10-2" href="#__codelineno-10-2"></a><span class="go"> unshackle_debug_EXAMPLE_20260703-142530.jsonl</span>
|
||||||
</span><span id="__span-10-3"><a id="__codelineno-10-3" name="__codelineno-10-3" href="#__codelineno-10-3"></a><span class="go">jq 'select(.operation == "http_request" and .request.path == "/v1/titles") | .response.body' \</span>
|
|
||||||
</span><span id="__span-10-4"><a id="__codelineno-10-4" name="__codelineno-10-4" href="#__codelineno-10-4"></a><span class="go"> unshackle_debug_EXAMPLE_20260703-142530.jsonl</span>
|
|
||||||
</span></code></pre></div>
|
</span></code></pre></div>
|
||||||
<p>The record covers the HTTP sessions that unshackle builds: the session from the service's <code>get_session()</code>, the import and <code>--remote</code> sessions, and the sessions of core helpers. A separate <code>requests.Session</code> that service code makes itself writes no entry.</p>
|
<p>The record covers the HTTP sessions that unshackle builds: the session from the service's <code>get_session()</code>, the import and <code>--remote</code> sessions, and the sessions of core helpers. A separate <code>requests.Session</code> that service code makes itself writes no entry.</p>
|
||||||
<p>On a <code>serve</code> server, the entries for the requests of a service stay on the server, with no body. A download job whose <code>dl</code> run has the JSON debug log on writes them to that log. A remote session writes none, because <code>serve</code> opens no JSON debug log for it. unshackle never sends them to a remote client: not in the remote session log, the remote session channel, an API reply or an error. A remote client with its own <code>debug_requests: true</code> records its own requests to the server, with the response bodies, in its own JSON debug log.</p>
|
|
||||||
<p>On an HTTP session of the <code>requests</code> library, <code>urllib3</code> retries inside one send. The attempts before the last then have no <code>duration_ms</code> and no <code>response.size</code>. A request that fails after all its retries gives one entry for the last failure, with <code>request.attempt</code> set to <code>null</code>.</p>
|
<p>On an HTTP session of the <code>requests</code> library, <code>urllib3</code> retries inside one send. The attempts before the last then have no <code>duration_ms</code> and no <code>response.size</code>. A request that fails after all its retries gives one entry for the last failure, with <code>request.attempt</code> set to <code>null</code>.</p>
|
||||||
|
<h3 id="the-body-folder">The body folder<a class="headerlink" href="#the-body-folder" title="Permanent link">¶</a></h3>
|
||||||
|
<p>unshackle writes each body that it records to its own file, in a folder beside the JSON debug log. The folder has the name of the log without <code>.jsonl</code>, for example <code>unshackle_debug_EXAMPLE_20260703-142530/</code>. unshackle makes the folder at the first body, so a run that records no body has no folder. A file holds the bytes as sent or as received, with no change.</p>
|
||||||
|
<p>The name of a file has these parts, in this order:</p>
|
||||||
|
<ol>
|
||||||
|
<li>A sequence number of four digits, in the order that unshackle records the requests.</li>
|
||||||
|
<li>The HTTP method.</li>
|
||||||
|
<li>The host, and the last segment of the URL path without its extension.</li>
|
||||||
|
<li><code>request</code> for a request body. The response body of the same request has the same number.</li>
|
||||||
|
<li>An extension from the content type: <code>.json</code>, <code>.xml</code>, <code>.js</code>, <code>.txt</code>, <code>.html</code>, <code>.png</code>. A manifest with an <code>.mpd</code> or <code>.m3u8</code> path, or a DASH or HLS content type, keeps <code>.mpd</code> or <code>.m3u8</code>. An unknown type has <code>.bin</code>.</li>
|
||||||
|
</ol>
|
||||||
|
<p>For example, <code>0003_POST_api.example.com_login_request.json</code> and <code>0003_POST_api.example.com_login.json</code>. unshackle keeps only letters, digits, <code>.</code>, <code>_</code> and <code>-</code> from the host and the path, and it limits their length, so each name is valid on Windows and each file stays in the folder.</p>
|
||||||
|
<p>unshackle writes a file for each recorded response, whatever its type: JSON, JSONP, XML, HTML, a manifest, or binary data such as a licence reply or an image. It writes no file for a response with no body, an event stream, a request sent with <code>stream=True</code>, or a server process. A request body gets a file when it is JSON, a form, text or bytes. A multipart, file or iterator body gets no file. Neither the log nor the folder contains headers.</p>
|
||||||
|
<p>On a <code>serve</code> server, the entries for the requests of a service stay on the server, and the server writes no body folder. A download job whose <code>dl</code> run has the JSON debug log on writes the entries to that log. A remote session writes none, because <code>serve</code> opens no JSON debug log for it. unshackle never sends them to a remote client: not in the remote session log, the remote session channel, an API reply or an error. A remote client with its own <code>debug_requests: true</code> records its own requests to the server in its own JSON debug log, and their bodies in its own body folder.</p>
|
||||||
<div class="admonition danger">
|
<div class="admonition danger">
|
||||||
<p class="admonition-title">A request record holds secrets</p>
|
<p class="admonition-title">The body folder holds secrets</p>
|
||||||
<p>unshackle writes the <code>http_request</code> entries as received. It masks only the local folder prefixes (<code>redact_paths</code>). With <code>debug_requests</code> on, the JSONL file holds tokens, passwords, cookies, content keys and account data, in the path, the query and the body. <code>debug_keys</code> does not apply to these entries. Keep the file on your computer. Never attach it to a report.</p>
|
<p>unshackle writes the body files as sent and received, with no redaction. They hold the passwords, tokens, cookies, content keys and account data of each request and reply. <code>debug_keys</code> does not apply to them. Keep the body folder on your computer. Never attach it to a report.</p>
|
||||||
</div>
|
</div>
|
||||||
<hr />
|
<hr />
|
||||||
<h2 id="what-gets-redacted">What gets redacted<a class="headerlink" href="#what-gets-redacted" title="Permanent link">¶</a></h2>
|
<h2 id="what-gets-redacted">What gets redacted<a class="headerlink" href="#what-gets-redacted" title="Permanent link">¶</a></h2>
|
||||||
@@ -2653,11 +2683,10 @@
|
|||||||
<li><strong>URLs</strong>: unshackle collapses every <code>http(s)</code> URL to <code>redacted</code>. It keeps only the file extension, so a manifest still shows as <code>redacted.mpd</code> and a segment as <code>redacted.m4s</code>. This hides the CDN, manifest, segment, and licence-server locations, but keeps the <em>type</em> of resource.</li>
|
<li><strong>URLs</strong>: unshackle collapses every <code>http(s)</code> URL to <code>redacted</code>. It keeps only the file extension, so a manifest still shows as <code>redacted.mpd</code> and a segment as <code>redacted.m4s</code>. This hides the CDN, manifest, segment, and licence-server locations, but keeps the <em>type</em> of resource.</li>
|
||||||
<li><strong>Local paths</strong>: unshackle replaces install-root, virtualenv, and home-directory prefixes with tokens, so your username and machine layout do not appear in logs.</li>
|
<li><strong>Local paths</strong>: unshackle replaces install-root, virtualenv, and home-directory prefixes with tokens, so your username and machine layout do not appear in logs.</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>The <a href="#debug-requests"><code>http_request</code> entries</a> of <code>debug_requests</code> get only the local path pass. Their secrets, URLs and bodies stay as received.</p>
|
|
||||||
<p>The <code>redact_paths</code> config key controls path redaction, and it is <strong>on by default</strong>:</p>
|
<p>The <code>redact_paths</code> config key controls path redaction, and it is <strong>on by default</strong>:</p>
|
||||||
<div class="language-yaml highlight"><pre><span></span><code><span id="__span-11-1"><a id="__codelineno-11-1" name="__codelineno-11-1" href="#__codelineno-11-1"></a><span class="nt">redact_paths</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span><span class="w"> </span><span class="c1"># default - mask local base directories in logged paths</span>
|
<div class="language-yaml highlight"><pre><span></span><code><span id="__span-11-1"><a id="__codelineno-11-1" name="__codelineno-11-1" href="#__codelineno-11-1"></a><span class="nt">redact_paths</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span><span class="w"> </span><span class="c1"># default - mask local base directories in logged paths</span>
|
||||||
</span></code></pre></div>
|
</span></code></pre></div>
|
||||||
<p>Set <code>redact_paths: false</code> if you debug a path problem locally and want to see full, unmasked paths in the console and logs. unshackle always applies secret and URL redaction in the JSON debug log, except in the <code>http_request</code> entries, and this toggle does not change that.</p>
|
<p>Set <code>redact_paths: false</code> if you debug a path problem locally and want to see full, unmasked paths in the console and logs. unshackle always applies secret and URL redaction in the JSON debug log, and this toggle does not change that.</p>
|
||||||
<hr />
|
<hr />
|
||||||
<h2 id="checking-your-environment">Checking your environment<a class="headerlink" href="#checking-your-environment" title="Permanent link">¶</a></h2>
|
<h2 id="checking-your-environment">Checking your environment<a class="headerlink" href="#checking-your-environment" title="Permanent link">¶</a></h2>
|
||||||
<p>Many "download failed" problems are really missing external tools or a config file that is not where you think it is. The <a href="../cli-reference/#env"><code>unshackle env</code></a> command group answers both questions before you dig into logs.</p>
|
<p>Many "download failed" problems are really missing external tools or a config file that is not where you think it is. The <a href="../cli-reference/#env"><code>unshackle env</code></a> command group answers both questions before you dig into logs.</p>
|
||||||
@@ -2801,7 +2830,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="admonition warning">
|
<div class="admonition warning">
|
||||||
<p class="admonition-title">No request bodies and no raw dumps</p>
|
<p class="admonition-title">No request bodies and no raw dumps</p>
|
||||||
<p>A <code>log_event</code> entry never holds a request body or a raw dump: no full <code>Tracks</code> object, no MPD/manifest body and no response payload. Only <code>debug_requests</code> records request and response bodies, in its <code>http_request</code> entries. Log only <strong>counts, ids, sizes, and <code>safe_display_url(url)</code></strong>. This keeps the log low-noise and prevents leaking title or manifest data into the file <em>before</em> redaction even runs. Redaction is a backstop, not a licence to dump raw objects.</p>
|
<p>A <code>log_event</code> entry never holds a request body or a raw dump: no full <code>Tracks</code> object, no MPD/manifest body and no response payload. Only <code>debug_requests</code> records request and response bodies, and only as files in its separate body folder. Log only <strong>counts, ids, sizes, and <code>safe_display_url(url)</code></strong>. This keeps the log low-noise and prevents leaking title or manifest data into the file <em>before</em> redaction even runs. Redaction is a backstop, not a licence to dump raw objects.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="admonition note">
|
<div class="admonition note">
|
||||||
<p class="admonition-title">Operation names: <code><area>_<event></code>, no registry</p>
|
<p class="admonition-title">Operation names: <code><area>_<event></code>, no registry</p>
|
||||||
|
|||||||
@@ -2441,13 +2441,13 @@ result in <code>directories.cache/update_check.json</code>.</p>
|
|||||||
<td><code>debug_requests</code></td>
|
<td><code>debug_requests</code></td>
|
||||||
<td>bool</td>
|
<td>bool</td>
|
||||||
<td><code>false</code></td>
|
<td><code>false</code></td>
|
||||||
<td>The one switch that writes an <code>http_request</code> entry for each HTTP attempt to the JSON debug log, with the text response body as received; <code>-d</code> and <code>debug</code> alone write none. With <code>-d</code> it also keeps the HTTP library logs in the console. See <a href="../../../guide/troubleshooting/#debug-requests">Debugging HTTP traffic</a>.</td>
|
<td>The one switch that writes an <code>http_request</code> entry for each HTTP attempt to the JSON debug log, and the request and response bodies as files in a folder beside it; <code>-d</code> and <code>debug</code> alone write neither. With <code>-d</code> it also keeps the HTTP library logs in the console. See <a href="../../../guide/troubleshooting/#debug-requests">Debugging HTTP traffic</a>.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>debug_requests_body_limit</code></td>
|
<td><code>debug_requests_body_limit</code></td>
|
||||||
<td>int</td>
|
<td>int</td>
|
||||||
<td><code>0</code></td>
|
<td><code>0</code></td>
|
||||||
<td>The maximum number of bytes of a response body in an <code>http_request</code> entry. <code>0</code> or unset records the full body. unshackle cuts a longer body and records its full size.</td>
|
<td>The maximum number of bytes of a body file of <code>debug_requests</code>. <code>0</code> or unset records the full body. unshackle cuts a longer body and records its full size.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>set_terminal_bg</code></td>
|
<td><code>set_terminal_bg</code></td>
|
||||||
@@ -2471,14 +2471,13 @@ INFO level during the DRM handshake. Treat <code>debug</code>, <code>debug_keys<
|
|||||||
sensitive, and keep <code>redact_paths</code> enabled when sharing logs.</p>
|
sensitive, and keep <code>redact_paths</code> enabled when sharing logs.</p>
|
||||||
<p><code>debug_keys</code> affects <strong>only</strong> content-encryption keys (the <code>content_key</code>/<code>key</code> fields).
|
<p><code>debug_keys</code> affects <strong>only</strong> content-encryption keys (the <code>content_key</code>/<code>key</code> fields).
|
||||||
Passwords, tokens, cookies, and session tokens are <strong>always</strong> redacted regardless of this
|
Passwords, tokens, cookies, and session tokens are <strong>always</strong> redacted regardless of this
|
||||||
setting, and KIDs, content key counts, and other metadata are always logged either way.
|
setting, and KIDs, content key counts, and other metadata are always logged either way.</p>
|
||||||
The <code>http_request</code> entries of <code>debug_requests</code> are the exception.</p>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="admonition danger">
|
<div class="admonition danger">
|
||||||
<p class="admonition-title"><code>debug_requests</code> writes secrets</p>
|
<p class="admonition-title">The body folder of <code>debug_requests</code> holds secrets</p>
|
||||||
<p>With <code>debug_requests</code> on, the JSONL file holds tokens, passwords, cookies, content keys and account data
|
<p>With <code>debug_requests</code> on, unshackle writes the request and response bodies as sent and received to files in a
|
||||||
as the servers sent them. unshackle masks only the local folder prefixes in these entries. Keep the file on
|
folder beside the JSONL file (<code>unshackle_debug_*/</code>), with no redaction. They hold passwords, tokens, cookies,
|
||||||
your computer. Never attach it to a report.</p>
|
content keys and account data. Keep the folder on your computer. Never attach it to a report.</p>
|
||||||
</div>
|
</div>
|
||||||
<hr />
|
<hr />
|
||||||
<h2 id="deprecated-removed-keys">Deprecated & removed keys<a class="headerlink" href="#deprecated-removed-keys" title="Permanent link">¶</a></h2>
|
<h2 id="deprecated-removed-keys">Deprecated & removed keys<a class="headerlink" href="#deprecated-removed-keys" title="Permanent link">¶</a></h2>
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user