def METHOD_NAME(self):
    self.category_cb = QComboBox()
    self.category_cb.addItem('all')
    for category in sorted(self.log_handler.categories):
        self.category_cb.addItem(category)
    def on_category(_index):
        self.log_view.setPlainText('')
        self.category = self.category_cb.currentText()
        self.log_handler.emit_all()
    self.category_cb.currentIndexChanged.connect(on_category)
    level_cb = QComboBox()
    for level in self.levels.values():
        level_cb.addItem(level)
    def on_level(_index):
        logs.set_level(level_cb.currentText())
    level_cb.setCurrentIndex(level_cb.findText(self.levels[logs.level()]))
    level_cb.currentIndexChanged.connect(on_level)
    hlayout = QHBoxLayout()
    hlayout.addWidget(QLabel(_('Log Category:')))
    hlayout.addWidget(self.category_cb)
    hlayout.addWidget(QLabel(_('Level:')))
    hlayout.addWidget(level_cb)
    hlayout.addStretch(1)
    vlayout = QVBoxLayout()
    vlayout.addLayout(hlayout)
    self.log_view = QPlainTextEdit(self)
    self.log_view.setReadOnly(True)
    self.log_view.setMaximumBlockCount(self.log_handler.max_records)
    vlayout.addWidget(self.log_view)
    self.setLayout(vlayout)
    self.setMinimumWidth(1000)
    self.setMinimumHeight(400)