Open main menu
Home
Random
Log in
Settings
About Sugar Labs
Disclaimers
Sugar Labs
Search
Changes
← Older edit
Newer edit →
Development Team/Code guidelines
(view source)
Revision as of 05:20, 24 August 2009
244 bytes added
,
05:20, 24 August 2009
no edit summary
Line 28:
Line 28:
Make sure that [[Development Team/API policy|API policy]] rules are respected.
Make sure that [[Development Team/API policy|API policy]] rules are respected.
+
+
== Debug logs ==
+
Let the logger do the string formatting instead of doing it ourselves. Use debug("foo %r bar", x) and not logging.debug("foo %r bar" % x).
+
+
Advantages:
+
* It's more robust
+
* formatting only happens if we actually log something
== Code style ==
== Code style ==
Erikos
3,267
edits