From a7b6ac365b68ebffa6eb41a3481fdc235d599692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Casta=C3=B1o=20Arteaga?= Date: Thu, 5 Dec 2024 17:14:05 +0100 Subject: [PATCH] Add some temporary trace lines (#287) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Sergio CastaƱo Arteaga --- clowarden-core/src/services/github/state.rs | 5 +++++ clowarden-server/src/main.rs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/clowarden-core/src/services/github/state.rs b/clowarden-core/src/services/github/state.rs index 349cc9b..6372204 100644 --- a/clowarden-core/src/services/github/state.rs +++ b/clowarden-core/src/services/github/state.rs @@ -20,6 +20,7 @@ use octorust::types::{ use regex::Regex; use serde::{Deserialize, Serialize}; use serde_json::json; +use tracing::trace; use crate::{ cfg::Legacy, @@ -147,11 +148,15 @@ impl State { for team in stream::iter(svc.list_teams(ctx).await?) .map(|team| async { // Get maintainers and members (including pending invitations) + trace!(team = %team.slug, "getting team maintainers"); let mut maintainers: Vec = svc.list_team_maintainers(ctx, &team.slug).await?.into_iter().map(|u| u.login).collect(); + trace!(team = %team.slug, "getting team members"); let mut members: Vec = svc.list_team_members(ctx, &team.slug).await?.into_iter().map(|u| u.login).collect(); + trace!(team = %team.slug, "getting team invitations"); for invitation in svc.list_team_invitations(ctx, &team.slug).await? { + trace!(team = %team.slug, login = %invitation.login, "getting team membership"); let membership = svc.get_team_membership(ctx, &team.slug, &invitation.login).await?; if membership.state == OrgMembershipState::Pending { match membership.role { diff --git a/clowarden-server/src/main.rs b/clowarden-server/src/main.rs index f745b4f..36de320 100644 --- a/clowarden-server/src/main.rs +++ b/clowarden-server/src/main.rs @@ -48,7 +48,7 @@ async fn main() -> Result<()> { // Setup logging if std::env::var_os("RUST_LOG").is_none() { - std::env::set_var("RUST_LOG", "clowarden=debug"); + std::env::set_var("RUST_LOG", "clowarden=trace"); } let ts = tracing_subscriber::fmt().with_env_filter(EnvFilter::from_default_env()); match cfg.log.format {