We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 64f0908 commit 18cf39dCopy full SHA for 18cf39d
rust/codeql-extractor.yml
@@ -54,3 +54,27 @@ options:
54
Comma-separated list of cfg settings to enable, or disable if prefixed with `-`.
55
Can be repeated.
56
type: array
57
+ logging:
58
+ title: Options pertaining to logging.
59
+ type: object
60
+ properties:
61
+ verbosity:
62
+ title: Extractor logging verbosity level.
63
+ description: >
64
+ Controls the level of verbosity of the extractor.
65
+ The supported levels are (in order of increasing verbosity):
66
+ - off
67
+ - errors
68
+ - warnings
69
+ - info or progress
70
+ - debug or progress+
71
+ - trace or progress++
72
+ - progress+++
73
+ type: string
74
+ pattern: "^(off|errors|warnings|(info|progress)|(debug|progress\\+)|(trace|progress\\+\\+)|progress\\+\\+\\+)$"
75
+ flamegraph:
76
+ title: "[Experimental] File path for write flame graph log"
77
78
+ Collect flame graph data using the `tracing-flame` crate. To render a flame graph
79
+ or chart, run the `inferno-flamegraph` command. See also: https://crates.io/crates/tracing-flame
80
rust/extractor/src/config.rs
@@ -50,8 +50,8 @@ pub struct Config {
50
pub cargo_target: Option<String>,
51
pub cargo_features: Vec<String>,
52
pub cargo_cfg_overrides: Vec<String>,
53
- pub flame_log: Option<PathBuf>,
- pub verbosity: Option<String>,
+ pub logging_flamegraph: Option<PathBuf>,
+ pub logging_verbosity: Option<String>,
pub compression: Compression,
pub inputs: Vec<PathBuf>,
pub qltest: bool,
@@ -65,7 +65,13 @@ impl Config {
.context("expanding parameter files")?;
let cli_args = CliConfig::parse_from(args);
let mut figment = Figment::new()
- .merge(Env::prefixed("CODEQL_"))
+ .merge(Env::raw().filter_map(|f| {
+ if f.eq("CODEQL_VERBOSITY") {
+ Some("LOGGING_VERBOSITY".into())
+ } else {
+ None
+ }
+ }))
.merge(Env::prefixed("CODEQL_EXTRACTOR_RUST_"))
.merge(Env::prefixed("CODEQL_EXTRACTOR_RUST_OPTION_"))
.merge(Serialized::defaults(cli_args));
rust/extractor/src/main.rs
@@ -186,7 +186,7 @@ fn main() -> anyhow::Result<()> {
186
qltest::prepare(&mut cfg)?;
187
}
188
let start = Instant::now();
189
- let (flame_layer, _flush_guard) = if let Some(path) = &cfg.flame_log {
+ let (flame_layer, _flush_guard) = if let Some(path) = &cfg.logging_flamegraph {
190
tracing_flame::FlameLayer::with_file(path)
191
.ok()
192
.map(|(a, b)| (Some(a), Some(b)))
@@ -198,7 +198,7 @@ fn main() -> anyhow::Result<()> {
198
tracing_subscriber::registry()
199
.with(codeql_extractor::extractor::default_subscriber_with_level(
200
"single_arch",
201
- &cfg.verbosity,
+ &cfg.logging_verbosity,
202
))
203
.with(flame_layer)
204
.init();
0 commit comments