<div dir="ltr">On Mon, Mar 27, 2017 at 5:51 PM, Paul Eggleton <span dir="ltr">&lt;<a href="mailto:paul.eggleton@linux.intel.com" target="_blank">paul.eggleton@linux.intel.com</a>&gt;</span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">BufferedLogger was sending log records to the target logger using<br>
handle() - this meant that the filtering (e.g. log level set)<br>
on the target logger was bypassed, leading for example to debug records<br>
getting printed when the log level was set to logging.WARNING.<br>
<br>
Signed-off-by: Paul Eggleton &lt;<a href="mailto:paul.eggleton@linux.intel.com">paul.eggleton@linux.intel.com</a><wbr>&gt;</blockquote><div><br></div><div>The ‘filter’ method of a Logger instance doesn’t log anything, it’s a subclass of Filterer, which just checks whether it should be logged. The ‘handle’ method of a Logger already consults self.filter(), if you check the code:</div><div><div><br></div><div>   def handle(self, record):</div><div>          &quot;&quot;&quot;</div><div>          Call the handlers for the specified record.</div><div><br></div><div>          This method is used for unpickled records received from a socket, as</div><div>          well as those created locally. Logger-level filtering is applied.</div><div>          &quot;&quot;&quot;</div><div>          if (not self.disabled) and self.filter(record):</div><div>              self.callHandlers(record)</div></div></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>Christopher Larson<br>kergoth at gmail dot com<br>Founder - BitBake, OpenEmbedded, OpenZaurus<br>Senior Software Engineer, Mentor Graphics</div></div></div></div></div></div></div>
</div></div>