const logger = console.context("myLogger");
logger.log("Hello");
logger.info("World");console: context() static method / notebook
console: context() static method
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
const a = console.context("A");
const b = console.context("B");
console.count("hits"); // hits: 1
a.count("hits"); // hits: 1
a.count("hits"); // hits: 2
b.count("hits"); // hits: 1
console.count("hits"); // hits: 2