| 431 | } |
| 432 | |
| 433 | fn parse_firedbg_config(workspace: &Workspace) -> Result<cfg::Config> { |
| 434 | let workspace_root_dir = &workspace.root_dir; |
| 435 | let config_file_path = &format!("{workspace_root_dir}/firedbg.toml"); |
| 436 | let config_file_path = Path::new(config_file_path); |
| 437 | let config = if config_file_path.exists() && config_file_path.is_file() { |
| 438 | let config_file_content = fs::read_to_string(&config_file_path).context("Fail to read")?; |
| 439 | toml::from_str(&config_file_content).context("Fail to parse TOML")? |
| 440 | } else { |
| 441 | console::warn( |
| 442 | "Tracing", |
| 443 | "`firedbg.toml` config file not found, default settings will be applied", |
| 444 | ); |
| 445 | cfg::Config::default() |
| 446 | }; |
| 447 | log::info!("firedbg_config\n{:#?}", config); |
| 448 | Ok(config) |
| 449 | } |
| 450 | |
| 451 | fn parse_trace_config<'a>( |
| 452 | config: &'a cfg::Config, |