You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3 lines
2.9 KiB

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>ScubaLogging (infer.IBase.ScubaLogging)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> <a href="../../index.html">infer</a> &#x00BB; <a href="../index.html">IBase</a> &#x00BB; ScubaLogging</nav><h1>Module <code>IBase.ScubaLogging</code></h1></header><aside><p>Functionality for logging into &quot;infer_events&quot; Scuba table. The table is organized in form of key-value pairs. Two most important fields are &quot;event&quot; and &quot;value&quot;. Other fields in the table correspond to things common for this particular run of Infer.</p></aside><dl><dt class="spec value" id="val-log_many"><a href="#val-log_many" class="anchor"></a><code><span class="keyword">val</span> log_many : <span><a href="../LogEntry/index.html#type-t">LogEntry.t</a> list</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>Log several events in one go. Useful when you do custom aggregations and have a place to log all aggregated results at once.</p></dd></dl><dl><dt class="spec value" id="val-log_count"><a href="#val-log_count" class="anchor"></a><code><span class="keyword">val</span> log_count : <span>label:string</span> <span>&#45;&gt;</span> <span>value:int</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>Log anything that can be counted. Events will be prefixed with <code>&quot;count.&quot;</code></p></dd></dl><dl><dt class="spec value" id="val-log_message"><a href="#val-log_message" class="anchor"></a><code><span class="keyword">val</span> log_message : <span>label:string</span> <span>&#45;&gt;</span> <span>message:string</span> <span>&#45;&gt;</span> unit</code></dt><dd><p>Log a <code>string</code>. Event is prefixed with <code>&quot;msg.&quot;</code></p></dd></dl><dl><dt class="spec value" id="val-execute_with_time_logging"><a href="#val-execute_with_time_logging" class="anchor"></a><code><span class="keyword">val</span> execute_with_time_logging : string <span>&#45;&gt;</span> <span>(unit <span>&#45;&gt;</span> <span class="type-var">'a</span>)</span> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt><dd><p>A helper to log execution time of a particular function. Use this to measure a performance of a given function. Example:</p><pre><code class="ml">let f a b = &lt;some code&gt;
let f a b = ScubaLogging.execute_with_time_logging &quot;f&quot; (fun () -&gt; f a b)</code></pre></dd></dl><dl><dt class="spec value" id="val-register_global_log_flushing_at_exit"><a href="#val-register_global_log_flushing_at_exit" class="anchor"></a><code><span class="keyword">val</span> register_global_log_flushing_at_exit : unit <span>&#45;&gt;</span> unit</code></dt></dl></div></body></html>