Skip to main content

Module DevLog

Module DevLog 

Source
Expand description

§Vine::DevLog

Tag-gated, debug-only logging macro. Gates on cfg!(debug_assertions) and the LAND_DEV_LOG environment variable, then emits through the log crate so the embedder’s configured logger (Air’s env_logger, Mountain’s tracing layer, …) decides where it lands.

§Usage

use Vine::dev_log;

dev_log!("grpc", "Connecting to sidecar '{}' at '{}'", id, addr);

§Tag filter

LAND_DEV_LOG accepts:

  • unset / empty - no dev-log output (release default).
  • all - every tag emits.
  • comma-separated tags (e.g. LAND_DEV_LOG=grpc,vine,boot) - only the listed tags emit.

The check is O(1) for all and O(tag-count) for the list form. Release builds short-circuit at the cfg!(debug_assertions) gate so the environment read never executes.

Functions§

IsEnabled
Returns true when dev-log emission is enabled for Tag.
NowNano
Monotonic process-relative nanosecond timestamp.