Skip to main content

init

Function init 

Source
pub fn init()
Expand description

Initialize the logging system.

Uses the RUST_LOG environment variable for filtering. If not set, defaults to shell_tunnel=info.

Diagnostics go to stderr, which leaves stdout for the things a caller wants to read: the public URL, the API key, the command to try. Sharing one stream means shell-tunnel --tunnel | grep "Public URL" picks up log lines instead.

ยงPanics

Panics if called more than once, or if another tracing subscriber has already been set.