From 66e8826465cc51ceb723223a6ec567ee5543a20b Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Fri, 9 Apr 2021 11:33:14 +0200 Subject: Add debug output Signed-off-by: Matthias Beyer --- src/commands/db.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/commands/db.rs b/src/commands/db.rs index 5961c77..7dbf08a 100644 --- a/src/commands/db.rs +++ b/src/commands/db.rs @@ -24,6 +24,7 @@ use diesel::JoinOnDsl; use diesel::QueryDsl; use diesel::RunQueryDsl; use itertools::Itertools; +use log::debug; use log::info; use crate::config::Configuration; @@ -324,6 +325,7 @@ fn jobs(conn_cfg: DbConnectionConfig, matches: &ArgMatches) -> Result<()> { // If we get a filter for environment on CLI, we fetch all job ids that are associated with the // passed environment variables and make `sel` filter for those. let sel = if let Some((name, val)) = matches.value_of("env_filter").map(crate::util::env::parse_to_env).transpose()? { + debug!("Filtering for ENV: {} = {}", name, val); let jids = schema::envvars::table .filter({ use crate::diesel::BoolExpressionMethods; @@ -334,6 +336,7 @@ fn jobs(conn_cfg: DbConnectionConfig, matches: &ArgMatches) -> Result<()> { .select(schema::job_envs::job_id) .load::(&conn)?; + debug!("Filtering for these IDs (because of env filter): {:?}", jids); sel.filter(schema::jobs::dsl::id.eq_any(jids)) } else { sel -- cgit v1.2.3