linol/logs/Logs_fmt/index.html
2024-05-08 15:15:46 +00:00

7 lines
5.1 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Logs_fmt (logs.Logs_fmt)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 2.4.2"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../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">logs</a> &#x00BB; Logs_fmt</nav><header class="odoc-preamble"><h1>Module <code><span>Logs_fmt</span></code></h1><p><code>Format</code> colorful reporter for <a href="../Logs/index.html"><code>Logs</code></a>.</p><p><em>v0.7.0 - <a href="https://erratique.ch/software/logs">homepage</a></em></p></header><nav class="odoc-toc"><ul><li><a href="#reporter">Reporter</a></li><li><a href="#cheader">Colored message headers</a></li></ul></nav><div class="odoc-content"><h2 id="reporter"><a href="#reporter" class="anchor"></a>Reporter</h2><div class="odoc-spec"><div class="spec value anchored" id="val-reporter"><a href="#val-reporter" class="anchor"></a><code><span><span class="keyword">val</span> reporter :
<span><span class="optlabel">?pp_header</span>:<span><span>(<a href="../Logs/index.html#type-level">Logs.level</a> * <span>string option</span>)</span> <a href="../../fmt/Fmt/index.html#type-t">Fmt.t</a></span> <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?app</span>:<a href="../../ocaml/Stdlib/Format/index.html#type-formatter">Stdlib.Format.formatter</a> <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?dst</span>:<a href="../../ocaml/Stdlib/Format/index.html#type-formatter">Stdlib.Format.formatter</a> <span class="arrow">&#45;&gt;</span></span>
<span>unit <span class="arrow">&#45;&gt;</span></span>
<a href="../Logs/index.html#type-reporter">Logs.reporter</a></span></code></div><div class="spec-doc"><p><code>reporter</code> is like <a href="../Logs/index.html#val-format_reporter"><code>Logs.format_reporter</code></a> except ANSI colors may be used in message header rendering if the formatters are configured to do so; see <a href="../../fmt/Fmt/index.html#val-set_style_renderer"><code>Fmt.set_style_renderer</code></a> and <a href="../../fmt/Fmt_tty/index.html"><code>Fmt_tty</code></a>.</p><p>Consult a full command line <a href="../Logs_cli/index.html#ex" title="ex">setup example</a>.</p></div></div><h2 id="cheader"><a href="#cheader" class="anchor"></a>Colored message headers</h2><div class="odoc-spec"><div class="spec value anchored" id="val-app_style"><a href="#val-app_style" class="anchor"></a><code><span><span class="keyword">val</span> app_style : <a href="../../fmt/Fmt/index.html#type-style">Fmt.style</a></span></code></div><div class="spec-doc"><p><code>app_style</code> is the style used to render headers at app level.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-err_style"><a href="#val-err_style" class="anchor"></a><code><span><span class="keyword">val</span> err_style : <a href="../../fmt/Fmt/index.html#type-style">Fmt.style</a></span></code></div><div class="spec-doc"><p><code>err_style</code> is the style used to render headers at error level.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-warn_style"><a href="#val-warn_style" class="anchor"></a><code><span><span class="keyword">val</span> warn_style : <a href="../../fmt/Fmt/index.html#type-style">Fmt.style</a></span></code></div><div class="spec-doc"><p><code>warn_style</code> is the style used to render headers at warning level.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-info_style"><a href="#val-info_style" class="anchor"></a><code><span><span class="keyword">val</span> info_style : <a href="../../fmt/Fmt/index.html#type-style">Fmt.style</a></span></code></div><div class="spec-doc"><p><code>info_style</code> is the style used to render headers at info level.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-debug_style"><a href="#val-debug_style" class="anchor"></a><code><span><span class="keyword">val</span> debug_style : <a href="../../fmt/Fmt/index.html#type-style">Fmt.style</a></span></code></div><div class="spec-doc"><p><code>debug_style</code> is the style used to render headers at debug level.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pp_header"><a href="#val-pp_header" class="anchor"></a><code><span><span class="keyword">val</span> pp_header : <span><span>(<a href="../Logs/index.html#type-level">Logs.level</a> * <span>string option</span>)</span> <a href="../../fmt/Fmt/index.html#type-t">Fmt.t</a></span></span></code></div><div class="spec-doc"><p><code>pp_header</code> is like <a href="../Logs/index.html#val-pp_header"><code>Logs.pp_header</code></a> but may use ANSI colors if the formatter is configured to do so, see <a href="../../fmt/Fmt/index.html#val-set_style_renderer"><code>Fmt.set_style_renderer</code></a> and <a href="../../fmt/Fmt_tty/index.html"><code>Fmt_tty</code></a>.</p></div></div></div></body></html>