Remove remaining verbose CalDAV discovery and authentication logs
- Remove discovery response XML dumps that flood console - Remove calendar collection checking logs - Remove authentication success messages - Remove API call password length logging - Fix unused variable warning Backend now runs with minimal essential logging only. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -39,19 +39,13 @@ impl AuthService {
|
||||
request.username.clone(),
|
||||
request.password.clone(),
|
||||
);
|
||||
println!("📝 Created CalDAV config");
|
||||
|
||||
// Test authentication against CalDAV server
|
||||
let caldav_client = CalDAVClient::new(caldav_config.clone());
|
||||
println!("🔗 Created CalDAV client, attempting to discover calendars...");
|
||||
|
||||
// Try to discover calendars as an authentication test
|
||||
match caldav_client.discover_calendars().await {
|
||||
Ok(calendars) => {
|
||||
println!(
|
||||
"✅ Authentication successful! Found {} calendars",
|
||||
calendars.len()
|
||||
);
|
||||
Ok(_calendars) => {
|
||||
|
||||
// Find or create user in database
|
||||
let user_repo = UserRepository::new(&self.db);
|
||||
|
||||
@@ -665,7 +665,6 @@ impl CalDAVClient {
|
||||
}
|
||||
|
||||
let body = response.text().await.map_err(CalDAVError::RequestError)?;
|
||||
println!("Discovery response for {}: {}", path, body);
|
||||
|
||||
let mut calendar_paths = Vec::new();
|
||||
|
||||
@@ -676,7 +675,6 @@ impl CalDAVClient {
|
||||
|
||||
// Extract href first
|
||||
if let Some(href) = self.extract_xml_content(response_content, "href") {
|
||||
println!("🔍 Checking resource: {}", href);
|
||||
|
||||
// Check if this is a calendar collection by looking for supported-calendar-component-set
|
||||
// This indicates it's an actual calendar that can contain events
|
||||
@@ -700,14 +698,10 @@ impl CalDAVClient {
|
||||
&& !href.ends_with("/calendars/")
|
||||
&& href.ends_with('/')
|
||||
{
|
||||
println!("📅 Found calendar collection: {}", href);
|
||||
calendar_paths.push(href);
|
||||
} else {
|
||||
println!("❌ Skipping system/root directory: {}", href);
|
||||
}
|
||||
} else {
|
||||
println!("ℹ️ Not a calendar collection: {} (is_calendar: {}, has_collection: {})",
|
||||
href, is_calendar, has_collection);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,10 +82,6 @@ pub async fn get_user_info(
|
||||
.await
|
||||
.map_err(|e| ApiError::Internal(format!("Failed to discover calendars: {}", e)))?;
|
||||
|
||||
println!(
|
||||
"✅ Authentication successful! Found {} calendars",
|
||||
calendar_paths.len()
|
||||
);
|
||||
|
||||
let calendars: Vec<CalendarInfo> = calendar_paths
|
||||
.iter()
|
||||
|
||||
@@ -35,7 +35,6 @@ pub async fn get_calendar_events(
|
||||
// Extract and verify token
|
||||
let token = extract_bearer_token(&headers)?;
|
||||
let password = extract_password_header(&headers)?;
|
||||
println!("🔑 API call with password length: {}", password.len());
|
||||
|
||||
// Create CalDAV config from token and password
|
||||
let config = state
|
||||
@@ -127,7 +126,6 @@ pub async fn get_calendar_events(
|
||||
});
|
||||
}
|
||||
|
||||
println!("📅 Returning {} events", all_events.len());
|
||||
Ok(Json(all_events))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user