MCPcopy Create free account
hub / github.com/CodSpeedHQ/codspeed / new

Method new

src/run_environment/github_actions/logger.rs:17–30  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15
16impl GithubActionLogger {
17 pub fn new() -> Self {
18 // Only enable debug logging if it's enabled in GitHub Actions.
19 // See: https://docs.github.com/en/actions/reference/workflows-and-actions/variables
20 let log_level = if env::var("RUNNER_DEBUG").unwrap_or_default() == "1" {
21 LevelFilter::Trace
22 } else {
23 env::var("CODSPEED_LOG")
24 .ok()
25 .and_then(|log_level| log_level.parse::<LevelFilter>().ok())
26 .unwrap_or(LevelFilter::Info)
27 };
28
29 Self { log_level }
30 }
31}
32
33impl Log for GithubActionLogger {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected