tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

console.sys.mjs (1080B)


      1 /**
      2 * Any copyright is dedicated to the Public Domain.
      3 * http://creativecommons.org/publicdomain/zero/1.0/
      4 */
      5 export var ConsoleTest = {
      6  go(dumpFunction) {
      7    console.log("Hello world!");
      8    console.createInstance().log("Hello world!");
      9 
     10    let c = console.createInstance({
     11      consoleID: "wow",
     12      innerID: "CUSTOM INNER",
     13      dump: dumpFunction,
     14      prefix: "_PREFIX_",
     15    });
     16 
     17    c.log("Hello world!");
     18    c.trace("Hello world!");
     19 
     20    console
     21      .createInstance({ innerID: "LEVEL", maxLogLevel: "Off" })
     22      .log("Invisible!");
     23    console
     24      .createInstance({ innerID: "LEVEL", maxLogLevel: "All" })
     25      .log("Hello world!");
     26    console
     27      .createInstance({
     28        innerID: "LEVEL",
     29        maxLogLevelPref: "pref.test.console",
     30      })
     31      .log("Hello world!");
     32 
     33    this.c2 = console.createInstance({
     34      innerID: "NO PREF",
     35      maxLogLevel: "Warn",
     36      maxLogLevelPref: "pref.test.console.notset",
     37    });
     38    this.c2.log("Invisible!");
     39    this.c2.warn("Hello world!");
     40  },
     41 
     42  go2() {
     43    this.c2.log("Hello world!");
     44  },
     45 };