diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-05-07 23:33:02 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-05-07 23:33:02 +0800 |
| commit | 5dbf91c920c64f47236771eec374eeea20838d88 (patch) | |
| tree | 5f99e3511e8164167ed3b49029b4a3116de5c551 /mingling_core/src | |
| parent | 3fd12ea50e0f7e041182658d35a9dc72abf86464 (diff) | |
Log node strings in get_nodes for debug builds
Diffstat (limited to 'mingling_core/src')
| -rw-r--r-- | mingling_core/src/program.rs | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/mingling_core/src/program.rs b/mingling_core/src/program.rs index a28e9b7..febb5db 100644 --- a/mingling_core/src/program.rs +++ b/mingling_core/src/program.rs @@ -426,8 +426,17 @@ pub fn get_nodes<C: ProgramCollect<Enum = C>>( #[cfg(feature = "dispatch_tree")] let r = C::get_nodes(); + #[cfg(feature = "dispatch_tree")] + { + #[cfg(feature = "debug")] + { + let node_strs: Vec<String> = r.iter().map(|v| v.0.clone()).collect(); + crate::info!("All Nodes: [{}]", node_strs.join(", ")); + } + } + #[cfg(not(feature = "dispatch_tree"))] - let r = program + let r: Vec<_> = program .dispatcher .iter() .map(|disp| { @@ -441,5 +450,14 @@ pub fn get_nodes<C: ProgramCollect<Enum = C>>( }) .collect(); + #[cfg(not(feature = "dispatch_tree"))] + { + #[cfg(feature = "debug")] + { + let node_strs: Vec<String> = r.iter().map(|v| v.0.clone()).collect(); + crate::info!("All Nodes: [{}]", node_strs.join(", ")); + } + } + return r; } |
