<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Flushing (ppx_minidebug.Minidebug_runtime.Flushing)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.3"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../odoc.support/highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> â€“ <a href="../../index.html">ppx_minidebug</a> &#x00BB; <a href="../index.html">Minidebug_runtime</a> &#x00BB; Flushing</nav><header class="odoc-preamble"><h1>Module <code><span>Minidebug_runtime.Flushing</span></code></h1><p>The output is flushed line-at-a-time, so no output should be lost if the traced program crashes. The logged traces are still indented, but if the values to print are multi-line, their formatting might be messy. The indentation is also smaller (half of PrintBox).</p></header><nav class="odoc-toc"><ul><li><a href="#parameters">Parameters</a></li><li><a href="#signature">Signature</a></li></ul></nav><div class="odoc-content"><h2 id="parameters"><a href="#parameters" class="anchor"></a>Parameters</h2><div class="odoc-spec"><div class="spec parameter anchored" id="argument-1-_"><a href="#argument-1-_" class="anchor"></a><code><span><span class="keyword">module</span> </span><span><a href="argument-1-_/index.html">_</a></span><span> : <a href="../module-type-Shared_config/index.html">Shared_config</a></span></code></div></div><h2 id="signature"><a href="#signature" class="anchor"></a>Signature</h2><div class="odoc-spec"><div class="spec value anchored" id="val-close_log"><a href="#val-close_log" class="anchor"></a><code><span><span class="keyword">val</span> close_log : <span><span class="label">fname</span>:string <span class="arrow">&#45;&gt;</span></span> <span><span class="label">start_lnum</span>:int <span class="arrow">&#45;&gt;</span></span> <span><span class="label">entry_id</span>:int <span class="arrow">&#45;&gt;</span></span> unit</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-open_log"><a href="#val-open_log" class="anchor"></a><code><span><span class="keyword">val</span> open_log : 
  <span><span class="label">fname</span>:string <span class="arrow">&#45;&gt;</span></span>
  <span><span class="label">start_lnum</span>:int <span class="arrow">&#45;&gt;</span></span>
  <span><span class="label">start_colnum</span>:int <span class="arrow">&#45;&gt;</span></span>
  <span><span class="label">end_lnum</span>:int <span class="arrow">&#45;&gt;</span></span>
  <span><span class="label">end_colnum</span>:int <span class="arrow">&#45;&gt;</span></span>
  <span><span class="label">message</span>:string <span class="arrow">&#45;&gt;</span></span>
  <span><span class="label">entry_id</span>:int <span class="arrow">&#45;&gt;</span></span>
  <span><span class="label">log_level</span>:int <span class="arrow">&#45;&gt;</span></span>
  <span><span>[ `Diagn <span>| `Debug</span> <span>| `Track</span> ]</span> <span class="arrow">&#45;&gt;</span></span>
  unit</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-open_log_no_source"><a href="#val-open_log_no_source" class="anchor"></a><code><span><span class="keyword">val</span> open_log_no_source : 
  <span><span class="label">message</span>:string <span class="arrow">&#45;&gt;</span></span>
  <span><span class="label">entry_id</span>:int <span class="arrow">&#45;&gt;</span></span>
  <span><span class="label">log_level</span>:int <span class="arrow">&#45;&gt;</span></span>
  <span><span>[ `Diagn <span>| `Debug</span> <span>| `Track</span> ]</span> <span class="arrow">&#45;&gt;</span></span>
  unit</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-log_value_sexp"><a href="#val-log_value_sexp" class="anchor"></a><code><span><span class="keyword">val</span> log_value_sexp : 
  <span><span class="optlabel">?descr</span>:string <span class="arrow">&#45;&gt;</span></span>
  <span><span class="label">entry_id</span>:int <span class="arrow">&#45;&gt;</span></span>
  <span><span class="label">log_level</span>:int <span class="arrow">&#45;&gt;</span></span>
  <span><span class="label">is_result</span>:bool <span class="arrow">&#45;&gt;</span></span>
  <span><span class="xref-unresolved">Sexplib0</span>.Sexp.t <span class="arrow">&#45;&gt;</span></span>
  unit</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-log_value_pp"><a href="#val-log_value_pp" class="anchor"></a><code><span><span class="keyword">val</span> log_value_pp : 
  <span><span class="optlabel">?descr</span>:string <span class="arrow">&#45;&gt;</span></span>
  <span><span class="label">entry_id</span>:int <span class="arrow">&#45;&gt;</span></span>
  <span><span class="label">log_level</span>:int <span class="arrow">&#45;&gt;</span></span>
  <span><span class="label">pp</span>:<span>(<span><span class="xref-unresolved">Stdlib</span>.Format.formatter <span class="arrow">&#45;&gt;</span></span> <span><span class="type-var">'a</span> <span class="arrow">&#45;&gt;</span></span> unit)</span> <span class="arrow">&#45;&gt;</span></span>
  <span><span class="label">is_result</span>:bool <span class="arrow">&#45;&gt;</span></span>
  <span><span class="type-var">'a</span> <span class="arrow">&#45;&gt;</span></span>
  unit</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-log_value_show"><a href="#val-log_value_show" class="anchor"></a><code><span><span class="keyword">val</span> log_value_show : 
  <span><span class="optlabel">?descr</span>:string <span class="arrow">&#45;&gt;</span></span>
  <span><span class="label">entry_id</span>:int <span class="arrow">&#45;&gt;</span></span>
  <span><span class="label">log_level</span>:int <span class="arrow">&#45;&gt;</span></span>
  <span><span class="label">is_result</span>:bool <span class="arrow">&#45;&gt;</span></span>
  <span>string <span class="arrow">&#45;&gt;</span></span>
  unit</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-log_value_printbox"><a href="#val-log_value_printbox" class="anchor"></a><code><span><span class="keyword">val</span> log_value_printbox : <span><span class="label">entry_id</span>:int <span class="arrow">&#45;&gt;</span></span> <span><span class="label">log_level</span>:int <span class="arrow">&#45;&gt;</span></span> <span><span class="xref-unresolved">PrintBox</span>.t <span class="arrow">&#45;&gt;</span></span> unit</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-exceeds_max_nesting"><a href="#val-exceeds_max_nesting" class="anchor"></a><code><span><span class="keyword">val</span> exceeds_max_nesting : <span>unit <span class="arrow">&#45;&gt;</span></span> bool</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-exceeds_max_children"><a href="#val-exceeds_max_children" class="anchor"></a><code><span><span class="keyword">val</span> exceeds_max_children : <span>unit <span class="arrow">&#45;&gt;</span></span> bool</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-get_entry_id"><a href="#val-get_entry_id" class="anchor"></a><code><span><span class="keyword">val</span> get_entry_id : <span>unit <span class="arrow">&#45;&gt;</span></span> int</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-max_nesting_depth"><a href="#val-max_nesting_depth" class="anchor"></a><code><span><span class="keyword">val</span> max_nesting_depth : <span><span>int option</span> <span class="xref-unresolved">Stdlib</span>.ref</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-max_num_children"><a href="#val-max_num_children" class="anchor"></a><code><span><span class="keyword">val</span> max_num_children : <span><span>int option</span> <span class="xref-unresolved">Stdlib</span>.ref</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-global_prefix"><a href="#val-global_prefix" class="anchor"></a><code><span><span class="keyword">val</span> global_prefix : string</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-snapshot"><a href="#val-snapshot" class="anchor"></a><code><span><span class="keyword">val</span> snapshot : <span>unit <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p>For <code>PrintBox</code> runtimes, outputs the current logging stack to the logging channel. If the logging channel supports that, an output following a snapshot will rewind the channel to the state prior to the snapshot. Does nothing for the <code>Flushing</code> runtimes.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-description"><a href="#val-description" class="anchor"></a><code><span><span class="keyword">val</span> description : string</span></code></div><div class="spec-doc"><p>A description that should be sufficient to locate where the logs end up. If not configured explicitly, it will be some combination of: the global prefix, the file name or &quot;stdout&quot;.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-no_debug_if"><a href="#val-no_debug_if" class="anchor"></a><code><span><span class="keyword">val</span> no_debug_if : <span>bool <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p>For <code>PrintBox</code> runtimes, when passed true within the scope of a log subtree, disables the logging of this subtree and its subtrees. Does not do anything when passed false (<code>no_debug_if false</code> does <em>not</em> re-enable the log). Does nothing for the <code>Flushing</code> runtimes.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-log_level"><a href="#val-log_level" class="anchor"></a><code><span><span class="keyword">val</span> log_level : <span>int <span class="xref-unresolved">Stdlib</span>.ref</span></span></code></div><div class="spec-doc"><p>The runtime log level.</p><p>The log levels are used both at compile time, and for the PrintBox runtime. Not logging at compile time means the corresponding logging code is not generated; not logging at runtime means the logging state is not updated.</p></div></div></div></body></html>
