[geary/wip/replay-queue-wedging: 5/5] Use brief Imap.Command string representations in debug logs
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/replay-queue-wedging: 5/5] Use brief Imap.Command string representations in debug logs
- Date: Fri, 9 Aug 2019 23:00:48 +0000 (UTC)
commit cfbe618220debfac36d1fa521e8228b0ad612f42
Author: Michael Gratton <mike vee net>
Date: Sat Aug 10 08:47:59 2019 +1000
Use brief Imap.Command string representations in debug logs
src/engine/imap/command/imap-command.vala | 9 +++++----
src/engine/imap/transport/imap-client-connection.vala | 4 ++--
2 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/src/engine/imap/command/imap-command.vala b/src/engine/imap/command/imap-command.vala
index d5be36b4..be7764de 100644
--- a/src/engine/imap/command/imap-command.vala
+++ b/src/engine/imap/command/imap-command.vala
@@ -323,6 +323,11 @@ public class Geary.Imap.Command : BaseObject {
this.literal_spinlock.blind_notify();
}
+ /** Returns the command tag and name for debugging. */
+ internal string to_brief_string() {
+ return "%s %s".printf(this.tag.to_string(), this.name);
+ }
+
/**
* Cancels any existing serialisation in progress.
*
@@ -359,10 +364,6 @@ public class Geary.Imap.Command : BaseObject {
}
}
- private string to_brief_string() {
- return "%s %s".printf(this.tag.to_string(), this.name);
- }
-
private void on_response_timeout() {
cancel(
new ImapError.TIMED_OUT("%s: Command timed out", to_brief_string())
diff --git a/src/engine/imap/transport/imap-client-connection.vala
b/src/engine/imap/transport/imap-client-connection.vala
index 88aeb168..960d12aa 100644
--- a/src/engine/imap/transport/imap-client-connection.vala
+++ b/src/engine/imap/transport/imap-client-connection.vala
@@ -260,7 +260,7 @@ public class Geary.Imap.ClientConnection : BaseObject {
foreach (Command pending in this.pending_queue.get_all()) {
debug(
"[%s] Cancelling pending command: %s",
- to_string(), pending.to_string()
+ to_string(), pending.to_brief_string()
);
pending.disconnected("Disconnected");
}
@@ -383,7 +383,7 @@ public class Geary.Imap.ClientConnection : BaseObject {
foreach (Command sent in this.sent_queue) {
debug(
"[%s] Cancelling sent command: %s",
- to_string(), sent.to_string()
+ to_string(), sent.to_brief_string()
);
sent.disconnected("Connection channels closed");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]