<main><divclass="width-limiter"><navclass="sub"><formclass="search-form"><span></span><divid="sidebar-button"tabindex="-1"><ahref="../../tracing_subscriber/all.html"title="show sidebar"></a></div><inputclass="search-input"name="search"aria-label="Run search in the documentation"autocomplete="off"spellcheck="false"placeholder="Click or press ‘S’ to search, ‘?’ for more options…"type="search"><divid="help-button"tabindex="-1"><ahref="../../help.html"title="help">?</a></div><divid="settings-menu"tabindex="-1"><ahref="../../settings.html"title="settings"><imgwidth="22"height="22"alt="Change settings"src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><sectionid="main-content"class="content"><divclass="main-heading"><h1>Function <ahref="../index.html">tracing_subscriber</a>::<wbr><ahref="index.html">fmt</a>::<wbr><aclass="fn"href="#">fmt</a><buttonid="copy-path"title="Copy item path to clipboard"><imgsrc="../../static.files/clipboard-7571035ce49a181d.svg"width="19"height="18"alt="Copy item path"></button></h1><spanclass="out-of-band"><aclass="src"href="../../src/tracing_subscriber/fmt/mod.rs.html#321-323">source</a> · <buttonid="toggle-all-docs"title="collapse all docs">[<span>−</span>]</button></span></div><preclass="rust item-decl"><code>pub fn fmt() -><aclass="struct"href="struct.SubscriberBuilder.html"title="struct tracing_subscriber::fmt::SubscriberBuilder">SubscriberBuilder</a></code></pre><detailsclass="toggle top-doc"open><summaryclass="hideme"><span>Expand description</span></summary><divclass="docblock"><p>Returns a new <ahref="struct.SubscriberBuilder.html"title="struct tracing_subscriber::fmt::SubscriberBuilder"><code>SubscriberBuilder</code></a> for configuring a <ahref="struct.Subscriber.html"title="struct tracing_subscriber::fmt::Subscriber">formatting subscriber</a>.</p>
<p>This is essentially shorthand for [<code>SubscriberBuilder::default()]</code>.</p>
<p>Using <ahref="struct.SubscriberBuilder.html#method.init"title="method tracing_subscriber::fmt::SubscriberBuilder::init"><code>init</code></a> to set the default subscriber:</p>
<spanclass="comment">// Set the subscriber as the default.
</span>.init();</code></pre></div>
<p><ahref="struct.SubscriberBuilder.html#method.try_init"title="method tracing_subscriber::fmt::SubscriberBuilder::try_init"><code>try_init</code></a> returns an error if the default subscriber could not be set:</p>
<p>Rather than setting the subscriber as the default, <ahref="struct.SubscriberBuilder.html#method.finish"title="method tracing_subscriber::fmt::SubscriberBuilder::finish"><code>finish</code></a><em>returns</em> the
constructed subscriber, which may then be passed to other functions:</p>