How to use the buttplug.ButtplugLogLevel.Debug function in buttplug

To help you get started, we’ve selected a few buttplug examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github buttplugio / buttplug-js / packages / buttplug-web-devtools / src / LogPanel.ts View on Github external
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.");
  }