diff options
author | Thomas Haller <thaller@redhat.com> | 2015-08-01 14:12:34 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2015-08-04 11:21:57 +0200 |
commit | 8c3f1812ead7fc5078cc1742643906fbf965bccd (patch) | |
tree | d9ce0c72de8815904ed704837ac4795f2278ddcf /src/nm-logging.h | |
parent | 655b85bfea2c8e4594c6da304c844da64c0faa4d (diff) | |
download | NetworkManager-8c3f1812ead7fc5078cc1742643906fbf965bccd.tar.gz |
logging: support an "OFF" logging level
The only way to disable logging for a domain entirely is to
omit the domain from the "domains" list. For example:
"level=INFO, domains=PLATFORM,..."
Now add an explicit level "OFF" to facilitate configuration like:
"level=INFO, domains=ALL,WIFI_SCAN:OFF"
It also supports
"level=OFF, domains=PLATFORM:INFO"
but this is for the most part equivalent to
"level=INFO, domains=PLATFORM"
Diffstat (limited to 'src/nm-logging.h')
-rw-r--r-- | src/nm-logging.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nm-logging.h b/src/nm-logging.h index 9fbe62721d..a346a7a657 100644 --- a/src/nm-logging.h +++ b/src/nm-logging.h @@ -90,7 +90,11 @@ typedef enum { /*< skip >*/ LOGL_WARN, LOGL_ERR, - _LOGL_N, /* the number of logging levels */ + _LOGL_N_REAL, /* the number of actual logging levels */ + + _LOGL_OFF = _LOGL_N_REAL, /* special logging level that is always disabled. */ + + _LOGL_N, /* the number of logging levels including "OFF" */ } NMLogLevel; #define nm_log_err(domain, ...) nm_log (LOGL_ERR, (domain), __VA_ARGS__) |