<pre><codeclass="python language-python hljs"><Formatter> = logging.Formatter(<spanclass="hljs-string">'<format>'</span>) <spanclass="hljs-comment"># Creates a Formatter.</span>
<Handler> = logging.FileHandler(<path>) <spanclass="hljs-comment"># Creates a Handler.</span>
<Handler>.setFormatter(<Formatter>) <spanclass="hljs-comment"># Adds Formatter to the Handler.</span>
<Handler>.setLevel(<str/int>) <spanclass="hljs-comment"># Processes all messages by default.</span>
<Handler>.setLevel(<int/str>) <spanclass="hljs-comment"># Processes all messages by default.</span>
<Logger>.addHandler(<Handler>) <spanclass="hljs-comment"># Adds Handler to the Logger.</span>
<Logger>.setLevel(<str/int>) <spanclass="hljs-comment"># What is sent to handlers and parents.</span>
<Logger>.setLevel(<int/str>) <spanclass="hljs-comment"># What is sent to handlers and parent.</span>
</code></pre>
<ul>
<li><strong>Parent logger can be specified by naming the child logger <codeclass="python hljs"><spanclass="hljs-string">'<parent>.<name>'</span></code>.</strong></li>