[gnome-shell] main: Use GLib's structured logging support



commit 07d25cd69dd3afb0c386523c20e7902cfb6a839b
Author: Florian Müllner <fmuellner gnome org>
Date:   Sat Jun 15 14:48:58 2019 +0200

    main: Use GLib's structured logging support
    
    We still use our own copy of a libgsystem method for structured
    logging, but since then GLib has gained (introspectable) API for
    that functionality, so switch to that.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/579

 js/ui/main.js | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/main.js b/js/ui/main.js
index c01be9882..5f789e996 100644
--- a/js/ui/main.js
+++ b/js/ui/main.js
@@ -42,6 +42,7 @@ const PointerA11yTimeout = imports.ui.pointerA11yTimeout;
 
 const A11Y_SCHEMA = 'org.gnome.desktop.a11y.keyboard';
 const STICKY_KEYS_ENABLE = 'stickykeys-enable';
+const LOG_DOMAIN = 'GNOME Shell';
 const GNOMESHELL_STARTED_MESSAGE_ID = 'f3ea493c22934e26811cd62abe8e203a';
 
 var componentManager = null;
@@ -243,8 +244,10 @@ function _initializeUI() {
         }
         if (sessionMode.currentMode != 'gdm' &&
             sessionMode.currentMode != 'initial-setup') {
-            Shell.Global.log_structured('GNOME Shell started at ' + _startDate,
-                                        ['MESSAGE_ID=' + GNOMESHELL_STARTED_MESSAGE_ID]);
+            GLib.log_structured(LOG_DOMAIN, GLib.LogLevelFlags.LEVEL_MESSAGE, {
+                'MESSAGE': `GNOME Shell started at ${_startDate}`,
+                'MESSAGE_ID': GNOMESHELL_STARTED_MESSAGE_ID
+            });
         }
 
         let perfModuleName = GLib.getenv("SHELL_PERF_MODULE");


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