Skip to content

Commit 4e49899

Browse files
committed
Adds more tracing to service method calls.
Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
1 parent 05a2a72 commit 4e49899

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

server/src/daemon/collection.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,15 @@ impl Collection {
108108
)
109109
.await;
110110
let path = OwnedObjectPath::from(item.path());
111-
tracing::info!("Item: created: {}", path);
112111

113112
connection
114113
.object_server()
115114
.at(&path, item.clone())
116115
.await
117116
.unwrap();
118117

118+
tracing::info!("Item: created: {}", path);
119+
119120
let connection_out = Arc::new(connection.to_owned());
120121
let collection_path = header.path().unwrap().to_owned();
121122

server/src/daemon/item.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ impl Item {
8383

8484
let secret = &crypto::encrypt(secret, key, iv.clone());
8585

86+
tracing::info!("GetSecret called for item: {}", self.path);
87+
8688
Ok((SecretInner(
8789
session.path().into(),
8890
iv,
@@ -94,6 +96,8 @@ impl Item {
9496
pub async fn set_secret(&self, secret: Vec<u8>) {
9597
let mut inner = self.inner.write().await;
9698
inner.set_secret(secret);
99+
100+
tracing::info!("SetSecret called for item: {}. secret updated", self.path);
97101
}
98102

99103
#[zbus(property, name = "Locked")]

server/src/daemon/service.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,8 @@ impl Service {
200200
.at(prompt.path().to_owned(), prompt.to_owned())
201201
.await?;
202202

203+
tracing::info!("Collection: /org/freedesktop/secrets/collection/login is unlocked");
204+
203205
Ok((unlocked, prompt.path().to_owned()))
204206
}
205207

@@ -282,6 +284,8 @@ impl Service {
282284
// a prompt isn't required here. returning an empty objectpath: '/' is enough
283285
let prompt = ObjectPath::default();
284286

287+
tracing::info!("Collection: /org/freedesktop/secrets/collection/login is locked");
288+
285289
Ok((locked, prompt))
286290
}
287291

@@ -364,6 +368,8 @@ impl Service {
364368

365369
let _ = Service::collection_changed(&ctxt, collection.path()).await;
366370

371+
tracing::info!("Collection: {} alias updated", collection.path());
372+
367373
Ok(())
368374
}
369375
None => {

server/src/daemon/session.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ impl Session {
2424
) -> fdo::Result<()> {
2525
self.manager.lock().unwrap().remove_session(self.path());
2626
object_server.remove::<Self, _>(&self.path).await?;
27+
2728
tracing::info!("Session closed: {}", self.path);
2829

2930
Ok(())

0 commit comments

Comments
 (0)