[geary/wip/problem-report-logs: 5/22] Fix incorrect log field key being used for Loggable objects



commit 8ecf1853b426d718705a439598326162a9ce0e48
Author: Michael Gratton <mike vee net>
Date:   Sun Jun 30 10:11:31 2019 +1000

    Fix incorrect log field key being used for Loggable objects

 src/engine/util/util-loggable.vala | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/engine/util/util-loggable.vala b/src/engine/util/util-loggable.vala
index 6fba32f9..b7bdf327 100644
--- a/src/engine/util/util-loggable.vala
+++ b/src/engine/util/util-loggable.vala
@@ -87,8 +87,8 @@ public interface Geary.Loggable : GLib.Object {
             this.count++;
         }
 
-        public inline void append_instance<T>(T value) {
-            this.append(typeof(T).name(), value);
+        public inline void append_loggable(Loggable value) {
+            this.append(value.get_type().name(), value);
         }
 
         public GLib.LogField[] to_array() {
@@ -177,7 +177,7 @@ public interface Geary.Loggable : GLib.Object {
         Context context = Context(Logging.DOMAIN, flags, levels, fmt, args);
         Loggable? decorated = this;
         while (decorated != null) {
-            context.append_instance(decorated);
+            context.append_loggable(decorated);
             decorated = decorated.loggable_parent;
         }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]