Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor() {
this.logTextArea = document.getElementById("buttplugdevtoolslogtextarea")! as HTMLTextAreaElement;
this.panelLevelSelect = document.getElementById("buttplugdevtoolsloglevelpanelselect")! as HTMLSelectElement;
this.consoleLevelSelect = document.getElementById("buttplugdevtoolsloglevelconsoleselect")! as HTMLSelectElement;
const log = ButtplugLogger.Logger;
log.addListener("log", (msg) => {
this.addLogMessage(msg);
});
this.panelLevelSelect.addEventListener("change", () => {
log.MaximumEventLogLevel = ButtplugLogLevel[this.panelLevelSelect.value];
});
this.consoleLevelSelect.addEventListener("change", () => {
log.MaximumConsoleLogLevel = ButtplugLogLevel[this.consoleLevelSelect.value];
});
log.MaximumEventLogLevel = ButtplugLogLevel.Debug;
log.Debug("LogPanel: DevTools Log panel enabled.");
}