From 70e18d99b8e3e77bb37e218d7ac582130156f8ef Mon Sep 17 00:00:00 2001
From: Michael Biebl g_print(). A plain "print()" function in python is not in sync
with these functions (it implements additional buffering). By
using nm_utils_print(), the same logging mechanisms can be used.
Also, libnm honors LIBNM_CLIENT_DEBUG_FILE environment. If this
-is set to a filename pattern (accepting "p" for the process ID),
-then the debug log is written to that file instead. With output_mode
-
-zero, the same location will be written. Since: 1.44.
LIBNM_CLIENT_DEBUG is a list of keywords separated by commas. The keyword
+"trace" enables printing messages of the lowest up to the highest severity.
+Likewise, the severities "debug", "warn" ("warning") and "error" are honored
+in similar way. Setting the flags "ERROR" or "WARN" ("WARNING") implies that
+respective levels are enabled, but also are ERROR messages printed with
+g_critical() and WARN messages with g_warning(). Together with G_DEBUG="fatal-warnings"
+or G_DEBUG="fatal-critical" this can be used to abort the program on errors.
+Note that all <error> messages imply an unexpected data on the D-Bus API
+(due to a bug). <warn> also implies unexepected data, but that can happen
+when using different versions of libnm and daemon. For testing, it is
+good to turn these into assertions.
By default, messages are printed to stderr, unless LIBNM_CLIENT_DEBUG
+contains "stdout" flag. Also, libnm honors LIBNM_CLIENT_DEBUG_FILE
+environment. If this is set to a filename pattern (accepting "%p" for the
+process ID), then the debug log is written to that file instead of
+stderr/stdout. With output_mode
+ zero, the same location will be written.
LIBNM_CLIENT_DEBUG_FILE is supported since 1.44. "ERROR", "WARN" and "WARNING" +are supported since 1.46.