()
| 15 | |
| 16 | impl 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 | |
| 33 | impl Log for GithubActionLogger { |
nothing calls this directly
no outgoing calls
no test coverage detected