probe.gl is a robust collection of JavaScript tools designed for console-focused logging, performance instrumentation, benchmarking, and testing across both browser and Node.js environments. The current stable version is 3.6.0. It is developed and maintained as part of the vis.gl open-source visualization suite by Uber, indicating a steady release cadence tied to the evolution of their larger ecosystem. Key differentiators include its 'off by default' design to ensure a minimal performance footprint when not actively used, its lightweight nature, and features like persistent configuration through local storage. It enhances the debugging experience with capabilities such as defeating log cascades (to prevent console flooding) and providing direct source code links from console messages. The library offers a more advanced approach to application insights compared to basic `console.log`.
npm install probe.glVerified import paths — ran on the pinned version, not inferred.
Demonstrates enabling probe.gl, setting log levels, using logging utilities, and basic performance timing with a `Timer`.
Always call `Probe.enable()` early in your application's lifecycle, typically after import. You can also configure specific options via `Probe.configure()` and `Probe.setLevel()`.
Prefer ES Module `import` syntax (`import Probe from 'probe.gl';`) for all modern JavaScript projects. Ensure your build system (Webpack, Rollup, Parcel) or Node.js environment is configured to handle ESM correctly.
Be mindful of `Probe.configure()` and `Probe.enable()` calls. If debugging, consider a reset method (e.g., `localStorage.removeItem('probe.gl:config')` or a custom application setting) or explicitly setting desired options at application start.Always check the documentation or the package structure for the correct import path for specific tools. Use `import { log } from '@probe.gl/log';` instead of `import { log } from 'probe.gl';`.Ensure you are using `import Probe from 'probe.gl';`. If exposing to window for debugging, add `window.Probe = Probe;`.
Verify your project's module resolution settings. For Node.js, ensure you're running in an ESM context (`'type': 'module'` in `package.json` or `.mjs` files). For bundlers, check `resolve` configurations.
Ensure `Probe.setLevel(level)` is called with a sufficiently high level (e.g., `Probe.setLevel(3)` for verbose logs). Also, confirm `Probe.configure({ isPrintEnabled: true })` to allow console output. Check browser local storage for persistent probe.gl configurations that might override current settings.No dependency data recorded yet.