Skip to main content

Module logging

Module logging 

Source
Expand description

Centralized tracing/logging initialization.

Call ferridriver_test::logging::init() once at startup. It’s safe to call multiple times — subsequent calls are no-ops.

Respects (in priority order):

  1. RUST_LOG — standard tracing env filter
  2. FERRIDRIVER_DEBUG — category-based filter
  3. verbose parameter — 0=warn, 1=debug, 2+=trace

§FERRIDRIVER_DEBUG categories

ValueTracing target
* / allferridriver=trace
cdpferridriver::cdp=trace
step / stepsferridriver::bdd::step=trace
hook / hooksferridriver::bdd::hook=trace
workerferridriver::worker=trace
fixtureferridriver::fixture=trace
reporterferridriver::reporter=trace
actionferridriver::action=trace
runnerferridriver::runner=trace

§Profiling modes (FERRIDRIVER_PROFILE env var)

ValueFeature flagOutput
chrome--features profilingtrace-{pid}.json (Chrome DevTools / Perfetto)
console--features tokio-consoleLive tokio-console dashboard

Functions§

init
Initialize the tracing subscriber. Safe to call multiple times.
init_from_env
Initialize with env-var-only detection (no verbose flag). Used by standalone harnesses and NAPI where there’s no CLI verbose flag.