[geary/mjog/logging-update: 4/8] Add Geary.Logging.Source::log method
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/mjog/logging-update: 4/8] Add Geary.Logging.Source::log method
- Date: Mon, 2 Dec 2019 10:26:19 +0000 (UTC)
commit 778a06af7744845c87f2b4c0ad7558302dc0b5d0
Author: Michael Gratton <mike vee net>
Date: Mon Dec 2 11:42:15 2019 +1100
Add Geary.Logging.Source::log method
Generic method allows custom level and flags to be specified.
src/engine/util/util-logging.vala | 10 ++++++++++
1 file changed, 10 insertions(+)
---
diff --git a/src/engine/util/util-logging.vala b/src/engine/util/util-logging.vala
index 30ff8ffe..ef823705 100644
--- a/src/engine/util/util-logging.vala
+++ b/src/engine/util/util-logging.vala
@@ -203,6 +203,16 @@ public interface Geary.Logging.Source : GLib.Object {
);
}
+ /**
+ * Logs a message with this object as context.
+ */
+ [PrintfFormat]
+ public inline void log(Logging.Flag flags,
+ GLib.LogLevelFlags levels,
+ string fmt, ...) {
+ log_structured(flags, levels, fmt, va_list());
+ }
+
private inline void log_structured(Logging.Flag flags,
GLib.LogLevelFlags levels,
string fmt,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]