summaryrefslogtreecommitdiff
path: root/HACKING
diff options
context:
space:
mode:
authorDirk-Jan C. Binnema <djcb@djcbsoftware.nl>2010-01-06 01:21:28 +0200
committerDirk-Jan C. Binnema <djcb@djcbsoftware.nl>2010-01-06 01:21:28 +0200
commit376c22772ca823db00d889c0d60c8169b23c3d9e (patch)
treea884c6c932536d970a066605dcd747fdafb0c088 /HACKING
parentb6ba6176a46239bb94789c7c14fc4822ef47edf7 (diff)
* HACKING: update instructions
Diffstat (limited to 'HACKING')
-rw-r--r--HACKING21
1 files changed, 21 insertions, 0 deletions
diff --git a/HACKING b/HACKING
index 931e1d6..930d27d 100644
--- a/HACKING
+++ b/HACKING
@@ -7,6 +7,7 @@ some of the more stylistic-aesthetic rules are clearly visible in current
source code, so as long as any new code 'fits in', it should go a long way in
satisfying these rules.
+
** Coding style
For consistency and even more important, to keep things understandable, mu
@@ -45,6 +46,26 @@ satisfying these rules.
11. returned strings of type char* must be freed by the caller; if they are
not to be freed, 'const char*' should be used instead
+** Logging
+
+ For logging, mu uses the GLib logging functions/macros as listed below,
+ except when logging may not have been initialized.
+
+ The logging system redirects most logging to the log file (typically,
+ ~/.mu/mu.log). g_warning, g_message and g_critical are shown to the user,
+ except when running with --quiet, in which case g_message is *not* shown.
+
+ =g_message= are for non-error messages the user will see (unless running with --quiet)
+ =g_warning= is for problems the user may be able to do something about (and
+ they are written on stderr)
+ =g_critical= is for serious, internal problems (g_return_if_fail and
+ friends use this). (and they are written on stderr)
+
+ don't use g_error
+
+ if you just want to log something in the log file, use MU_LOG_WRITE, as
+ defined in mu-util.h
+
#+ Local Variables: ***
#+ mode:org ***