Mockup showing how the proposed contextual logs would look like. The log message displays a badge at the beginning of the line, that's colored, and that has the name of the context in it.

Contextual logging with console.context()

Patrick Brosset -

What if there was a way to make console logs in DevTools stand out more, be easier to find, and easier to filter? On the Edge team, we're proposing to use the <code>console.context()</code> API to add badges to log messages from different parts of your codebase, and to make it easier to filter them in the console.

Read the article at https://blogs.windows.com/msedgedev/2025/04/22/contextual-logging-with-console-context/