Commit 7f9724d0 authored by John Stowers's avatar John Stowers

tidy logging a little

parent fe467c62
......@@ -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
)
......
......@@ -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
......
......@@ -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:
......
......@@ -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):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment