start_recording

Function start_recording 

Source
pub fn start_recording(output_dir: Option<PathBuf>)
Expand description

Starts recording, stops on process exit or on stop_recording.

Note that this is called automatically on startup if the "ZNG_RECORD_TRACE" environment variable is set and that is the recommended way of enabling recording as it record all processes not just the calling process.

§Config and Output

See the zng::app::trace_recorder module documentation for details on how to configure the recording and the output file structure.

§Panics

Panics if another tracing subscriber was already inited.

Note that this can cause panics on any subsequent attempt to init subscribers, no other log subscriber must run after recording starts, including attempts to restart recording after stopping.

Panics cannot write to the output dir.