[gnome-shell/wip/snwh/appgrid-regression-fixes] parentalControlsManager: Be less verbose on the logs



commit 634111b7d09b6eb30a09c006f3e272cd6c2573d3
Author: Jonas Dreßler <verdre v0yd nl>
Date:   Fri Feb 18 14:13:59 2022 +0100

    parentalControlsManager: Be less verbose on the logs
    
    There's a few things that are really unncessary to log without any
    debugging enabled, for example "Getting parental controls for user", so
    remove that.
    
    Other things can be useful, so use console.debug() to log those.
    
    Especially the warning in showAppInfo() we don't want log by default as
    it spills tons of messages during shell startup (the async
    initialization of the malcontent manager takes some time).
    
    While at it, also make the !HAVE_MALCONTENT message a bit more accurate.
    
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2196>

 js/misc/parentalControlsManager.js | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/js/misc/parentalControlsManager.js b/js/misc/parentalControlsManager.js
index 092721133a..e2192caea6 100644
--- a/js/misc/parentalControlsManager.js
+++ b/js/misc/parentalControlsManager.js
@@ -65,13 +65,12 @@ var ParentalControlsManager = GObject.registerClass({
 
     async _initializeManager() {
         if (!HAVE_MALCONTENT) {
-            log('Skipping parental controls support as it’s disabled');
+            console.debug('Skipping parental controls support, malcontent not found');
             this._initialized = true;
             this.emit('app-filter-changed');
             return;
         }
 
-        log(`Getting parental controls for user ${Shell.util_get_uid()}`);
         try {
             const connection = await Gio.DBus.get(Gio.BusType.SYSTEM, null);
             this._manager = new Malcontent.Manager({ connection });
@@ -81,7 +80,7 @@ var ParentalControlsManager = GObject.registerClass({
                 null);
         } catch (e) {
             if (e.matches(Malcontent.ManagerError, Malcontent.ManagerError.DISABLED)) {
-                log('Parental controls globally disabled');
+                console.debug('Parental controls globally disabled');
                 this._disabled = true;
             } else {
                 logError(e, 'Failed to get parental controls settings');
@@ -137,7 +136,7 @@ var ParentalControlsManager = GObject.registerClass({
 
         // Have we finished initialising yet?
         if (!this.initialized) {
-            log(`Warning: Hiding app because parental controls not yet initialised: ${appInfo.get_id()}`);
+            console.debug(`Hiding app because parental controls not yet initialised: ${appInfo.get_id()}`);
             return false;
         }
 


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