from bfs.bfs10077.bfs10104 import bfs10106
from logging import StreamHandler, Filter
import logging
import sys
bfs10107 = logging.getLogger(__name__)
class bfs10110(Filter):
  def __init__(self, bfs10111, bfs10112, name=''):
    if bfs10106():
      Filter.__init__(self, name=name)
    else:
      super(bfs10110, self).__init__(name)

    self.bfs10111 = bfs10111
    self.bfs10112 = bfs10112

  def filter(self, bfs10113):
    assert (self.bfs10112 in self.bfs10111.handlers), ('This filter is only intended to be used when log handler %r is among the handlers for logger %r. Did you maybe forget to add the log handler to the logger?' % (self.bfs10112, self.bfs10111))
    bfs10115 = (len(self.bfs10111.handlers) == 1)
    return bfs10115


if (not bfs10107.handlers):
  bfs10114 = StreamHandler(sys.stderr)
  bfs10114.setLevel(logging.WARNING)
  bfs10114.addFilter(bfs10110(bfs10107, bfs10114))
  bfs10107.addHandler(bfs10114)

