summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-06-21 09:03:23 +0200
committerThomas Haller <thaller@redhat.com>2018-06-24 14:18:05 +0200
commit10a9b8643cb2956313a54bf44bddd5fc1cc11ffe (patch)
treea6059937d01abc4d88d2095cf508e3bfad3db1a7
parent42892437b578e667d2ff04720122c64bf693166e (diff)
downloadNetworkManager-10a9b8643cb2956313a54bf44bddd5fc1cc11ffe.tar.gz
logging/trivial: add code comment about logging-backend
-rw-r--r--src/nm-logging.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nm-logging.c b/src/nm-logging.c
index 9ac79a45b4..2eab3e6014 100644
--- a/src/nm-logging.c
+++ b/src/nm-logging.c
@@ -98,6 +98,12 @@ static struct Global {
const char *prefix;
const char *syslog_identifier;
enum {
+ /* before we setup syslog (during start), the backend defaults to GLIB, meaning:
+ * we use g_log() for all logging. At that point, the application is not yet supposed
+ * to do any logging and doing so indicates a bug.
+ *
+ * Afterwards, the backend is either SYSLOG or JOURNAL. From that point, also
+ * g_log() is redirected to this backend via a logging handler. */
LOG_BACKEND_GLIB,
LOG_BACKEND_SYSLOG,
LOG_BACKEND_JOURNAL,