Skip to content

Commit

Permalink
Add some temporary trace lines
Browse files Browse the repository at this point in the history
Signed-off-by: Sergio Castaño Arteaga <[email protected]>
  • Loading branch information
tegioz committed Dec 5, 2024
1 parent d5ab740 commit a362781
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions clowarden-core/src/services/github/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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<UserName> =
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<UserName> =
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 {
Expand Down
2 changes: 1 addition & 1 deletion clowarden-server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit a362781

Please sign in to comment.