Highly ambitious ATProtocol AppView service and sdks
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

add collection info to record inserted/updated logs

+14 -5
+14 -5
api/src/jetstream.rs
··· 231 231 232 232 match self.database.upsert_record(&record).await { 233 233 Ok(is_insert) => { 234 - let message = if is_insert { "Record inserted" } else { "Record updated" }; 234 + let message = if is_insert { 235 + format!("Record inserted in {}", commit.collection) 236 + } else { 237 + format!("Record updated in {}", commit.collection) 238 + }; 235 239 let operation = if is_insert { "insert" } else { "update" }; 236 - Logger::global().log_jetstream(LogLevel::Info, message, Some(serde_json::json!({ 240 + Logger::global().log_jetstream(LogLevel::Info, &message, Some(serde_json::json!({ 237 241 "operation": operation, 238 242 "collection": commit.collection, 239 243 "slice_uri": slice_uri, ··· 277 281 278 282 match self.database.upsert_record(&record).await { 279 283 Ok(is_insert) => { 280 - let message = if is_insert { "Record inserted" } else { "Record updated" }; 284 + let message = if is_insert { 285 + format!("Record inserted in {}", commit.collection) 286 + } else { 287 + format!("Record updated in {}", commit.collection) 288 + }; 281 289 let operation = if is_insert { "insert" } else { "update" }; 282 - Logger::global().log_jetstream(LogLevel::Info, message, Some(serde_json::json!({ 290 + Logger::global().log_jetstream(LogLevel::Info, &message, Some(serde_json::json!({ 283 291 "operation": operation, 284 292 "collection": commit.collection, 285 293 "slice_uri": slice_uri, ··· 332 340 Ok(rows_affected) => { 333 341 if rows_affected > 0 { 334 342 info!("✓ Deleted record globally: {} ({} rows)", uri, rows_affected); 335 - Logger::global().log_jetstream(LogLevel::Info, "Record deleted", Some(serde_json::json!({ 343 + let message = format!("Record deleted from {}", commit.collection); 344 + Logger::global().log_jetstream(LogLevel::Info, &message, Some(serde_json::json!({ 336 345 "operation": "delete", 337 346 "collection": commit.collection, 338 347 "did": did,