fix a typo in the doc
This commit is contained in:
parent
2936c0363b
commit
81e3f6fd03
2 changed files with 2 additions and 2 deletions
|
|
@ -191,7 +191,7 @@ Or, if you want to declare some semantics beforehand:
|
|||
// Print warning messages in bold magenta:
|
||||
using fmt = clutchlog::fmt;
|
||||
fmt warn(fmt::fg::magenta, fmt::typo::bold);
|
||||
log.style(clutchlog::level::magenta, warn);
|
||||
log.style(clutchlog::level::warning, warn);
|
||||
```
|
||||
|
||||
Using the `clutchlog::fmt` class, you can style:
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ Output Configuration</h2>
|
|||
<p>The default format of the comment added with the dump macro is <code>"# [{name}] {level} in {func} (at depth {depth}) @ {file}:{line}"</code>. It can be edited with the <code>format_comment</code> method. If it is set to an empty string, then no comment line is added. The default can be modified at compile time with <code>CLUTCHDUMP_DEFAULT_FORMAT</code>. By default, the separator between items in the container is a new line. To change this behaviour, you can change <code>CLUTCHDUMP_DEFAULT_SEP</code> or call the low-level <code>dump</code> method.</p>
|
||||
<p>The mark used with the <code>{depth_marks}</code> tag can be configured with the <code>depth_mark</code> method, and its default with the <code>CLUTCHLOG_DEFAULT_DEPTH_MARK</code> macro: </p><div class="fragment"><div class="line">log.depth_mark(CLUTCHLOG_DEFAULT_DEPTH_MARK); <span class="comment">// Defaults to ">".</span></div></div><!-- fragment --><h2><a class="anchor" id="autotoc_md7"></a>
|
||||
Output style</h2>
|
||||
<p>The output can be colored differently depending on the log level. </p><div class="fragment"><div class="line"><span class="comment">// Print error messages in bold red:</span></div><div class="line">log.style(clutchlog::level::error, <span class="comment">// First, the log level.</span></div><div class="line"> clutchlog::fmt::fg::red, <span class="comment">// Then the styles, in any order...</span></div><div class="line"> clutchlog::fmt::typo::bold);</div></div><!-- fragment --><p>Or, if you want to declare some semantics beforehand: </p><div class="fragment"><div class="line"><span class="comment">// Print warning messages in bold magenta:</span></div><div class="line"><span class="keyword">using</span> fmt = <a class="code" href="classclutchlog_1_1fmt.html">clutchlog::fmt</a>;</div><div class="line">fmt warn(fmt::fg::magenta, fmt::typo::bold);</div><div class="line">log.style(clutchlog::level::magenta, warn);</div></div><!-- fragment --><p>Using the <code><a class="el" href="classclutchlog_1_1fmt.html" title="Color and style formatter for ANSI terminal escape sequences. ">clutchlog::fmt</a></code> class, you can style:</p>
|
||||
<p>The output can be colored differently depending on the log level. </p><div class="fragment"><div class="line"><span class="comment">// Print error messages in bold red:</span></div><div class="line">log.style(clutchlog::level::error, <span class="comment">// First, the log level.</span></div><div class="line"> clutchlog::fmt::fg::red, <span class="comment">// Then the styles, in any order...</span></div><div class="line"> clutchlog::fmt::typo::bold);</div></div><!-- fragment --><p>Or, if you want to declare some semantics beforehand: </p><div class="fragment"><div class="line"><span class="comment">// Print warning messages in bold magenta:</span></div><div class="line"><span class="keyword">using</span> fmt = <a class="code" href="classclutchlog_1_1fmt.html">clutchlog::fmt</a>;</div><div class="line">fmt warn(fmt::fg::magenta, fmt::typo::bold);</div><div class="line">log.style(clutchlog::level::warning, warn);</div></div><!-- fragment --><p>Using the <code><a class="el" href="classclutchlog_1_1fmt.html" title="Color and style formatter for ANSI terminal escape sequences. ">clutchlog::fmt</a></code> class, you can style:</p>
|
||||
<ul>
|
||||
<li>the foreground color, passing a <code><a class="el" href="classclutchlog_1_1fmt.html#a4662a3ec3577c6a575a2c734636ed8a0" title="Foreground color codes. ">clutchlog::fmt::fg</a></code>,</li>
|
||||
<li>the background color, passing a <code><a class="el" href="classclutchlog_1_1fmt.html#a1cf3e27e4041250ffea0a6d58010da1e" title="Background color codes. ">clutchlog::fmt::bg</a></code>,</li>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue