[gnome-tweak-tool] tidy logging a little
- From: John Stowers <jstowers src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tweak-tool] tidy logging a little
- Date: Thu, 6 Dec 2012 11:51:21 +0000 (UTC)
commit 7f9724d00c066e9ce1f150ae149f3a0851433d1d
Author: John Stowers <john stowers gmail com>
Date: Thu Dec 6 12:51:18 2012 +0100
tidy logging a little
gtweak/gsettings.py | 11 ++++++-----
gtweak/gshellwrapper.py | 2 +-
gtweak/tweaks/tweak_typing.py | 4 ++--
gtweak/widgets.py | 4 ++--
4 files changed, 11 insertions(+), 10 deletions(-)
---
diff --git a/gtweak/gsettings.py b/gtweak/gsettings.py
index 281fe34..d1b00d5 100644
--- a/gtweak/gsettings.py
+++ b/gtweak/gsettings.py
@@ -57,7 +57,7 @@ class _GSettingsSchema:
global_translation = gettext.NullTranslations()
except IOError:
global_translation = None
- logging.info("No translated schema for %s (domain: %s)" % (schema_name, global_gettext_domain))
+ logging.debug("No translated schema for %s (domain: %s)" % (schema_name, global_gettext_domain))
for schema in dom.getElementsByTagName("schema"):
gettext_domain = schema.getAttribute('gettext-domain')
try:
@@ -67,23 +67,24 @@ class _GSettingsSchema:
translation = global_translation
except IOError:
translation = None
- logging.info("No translated schema for %s (domain: %s)" % (schema_name, gettext_domain))
+ logging.debug("Schema not translated %s (domain: %s)" % (schema_name, gettext_domain))
if schema_name == schema.getAttribute("id"):
for key in schema.getElementsByTagName("key"):
- #summary is compulsory, description is optional
+ name = key.getAttribute("name")
+ #summary is 'compulsory', description is optional
#... in theory, but we should not barf on bad schemas ever
try:
summary = key.getElementsByTagName("summary")[0].childNodes[0].data
except:
summary = ""
- logging.warning("Schema %s missing summary text: %s" % (schema_path, key.toxml()))
+ logging.info("Schema missing summary %s (key %s)" % (os.path.basename(schema_path),name))
try:
description = key.getElementsByTagName("description")[0].childNodes[0].data
except:
description = ""
#if missing translations, use the untranslated values
- self._schema[key.getAttribute("name")] = dict(
+ self._schema[name] = dict(
summary=translation.gettext(summary) if translation else summary,
description=translation.gettext(description) if translation else description
)
diff --git a/gtweak/gshellwrapper.py b/gtweak/gshellwrapper.py
index 21c57a3..67a260d 100644
--- a/gtweak/gshellwrapper.py
+++ b/gtweak/gshellwrapper.py
@@ -54,7 +54,7 @@ class _ShellProxy:
if result and output:
self._mode = json.loads(output)
else:
- logging.critical("Error getting shell mode via Eval JS")
+ logging.warning("Error getting shell mode via Eval JS")
self._mode = "user"
#GNOME Shell > 3.3 added the Version to the DBus API and disabled execute_js
diff --git a/gtweak/tweaks/tweak_typing.py b/gtweak/tweaks/tweak_typing.py
index 799c7d7..2b6690e 100644
--- a/gtweak/tweaks/tweak_typing.py
+++ b/gtweak/tweaks/tweak_typing.py
@@ -111,9 +111,9 @@ class TypingTweakGroup(TweakGroup):
self._xkb_info = GnomeDesktop.XkbInfo()
ok = True
except GSettingsMissingError:
- logging.warning("Missing schema %s" % self.XKB_GSETTINGS_SCHEMA)
+ logging.info("Typing missing schema %s" % self.XKB_GSETTINGS_SCHEMA)
except AttributeError:
- logging.warning("Missing GnomeDesktop.gir with Xkb support")
+ logging.warning("Typing missing GnomeDesktop.gir with Xkb support")
finally:
if ok:
for opt in self.XKB_OPTIONS:
diff --git a/gtweak/widgets.py b/gtweak/widgets.py
index 4d04b61..8bf4855 100644
--- a/gtweak/widgets.py
+++ b/gtweak/widgets.py
@@ -132,12 +132,12 @@ class _GSettingsTweak(Tweak):
self.settings = GSettingsFakeSetting()
Tweak.__init__(self,"","")
self.loaded = False
- logging.info("Missing gsettings %s" % (e.message))
+ logging.info("GSetting missing %s" % (e.message))
except KeyError:
self.settings = GSettingsFakeSetting()
Tweak.__init__(self,"","")
self.loaded = False
- logging.info("Missing gsettings %s (key %s)" % (schema_name, key_name))
+ logging.info("GSettings missing key %s (key %s)" % (schema_name, key_name))
class GSettingsSwitchTweak(_GSettingsTweak):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]