Overhaul log viewer

* Move viewer to separate modal to allow using more horizontal space
* Load log history (up to 2048 lines)
* Add colors and use table styling for log viewer
* Add links to log entries that open mentioned instance/client or line in code
This commit is contained in:
Tulir Asokan 2018-11-29 00:58:20 +02:00
parent aac99b7ee4
commit 32b60fa0ff
20 changed files with 545 additions and 82 deletions

View file

@ -31,7 +31,7 @@ from .client import Client
from .loader import PluginLoader
from .plugin_base import Plugin
log = logging.getLogger("maubot.plugin")
log = logging.getLogger("maubot.instance")
yaml = YAML()
yaml.indent(4)
@ -54,7 +54,7 @@ class PluginInstance:
def __init__(self, db_instance: DBPlugin):
self.db_instance = db_instance
self.log = logging.getLogger(f"maubot.plugin.{self.id}")
self.log = log.getChild(self.id)
self.config = None
self.started = False
self.loader = None