logging: add LOGD_PLATFORM

This commit is contained in:
Pavel Šimerda
2013-01-23 10:25:18 +01:00
parent 663859c180
commit 1495853e01
2 changed files with 10 additions and 3 deletions

View File

@@ -37,7 +37,7 @@
#include "nm-logging.h"
#define LOGD_ALL \
(LOGD_HW | LOGD_RFKILL | LOGD_ETHER | LOGD_WIFI | LOGD_BT | LOGD_MB | \
(LOGD_PLATFORM | LOGD_RFKILL | LOGD_ETHER | LOGD_WIFI | LOGD_BT | LOGD_MB | \
LOGD_DHCP4 | LOGD_DHCP6 | LOGD_PPP | LOGD_WIFI_SCAN | LOGD_IP4 | \
LOGD_IP6 | LOGD_AUTOIP4 | LOGD_DNS | LOGD_VPN | LOGD_SHARING | \
LOGD_SUPPLICANT | LOGD_AGENTS | LOGD_SETTINGS | LOGD_SUSPEND | \
@@ -65,7 +65,7 @@ static const LogDesc level_descs[] = {
static const LogDesc domain_descs[] = {
{ LOGD_NONE, "NONE" },
{ LOGD_HW, "HW" },
{ LOGD_PLATFORM, "PLATFORM" },
{ LOGD_RFKILL, "RFKILL" },
{ LOGD_ETHER, "ETHER" },
{ LOGD_WIFI, "WIFI" },
@@ -176,6 +176,12 @@ nm_logging_setup (const char *level, const char *domains, GError **error)
found = TRUE;
}
/* Check for compatibility domains */
if (!strcasecmp (*iter, "HW")) {
new_domains |= LOGD_PLATFORM;
found = TRUE;
}
if (!found) {
g_set_error (error, NM_LOGGING_ERROR, NM_LOGGING_ERROR_UNKNOWN_DOMAIN,
_("Unknown log domain '%s'"), *iter);

View File

@@ -28,7 +28,7 @@
/* Log domains */
enum {
LOGD_NONE = 0x00000000,
LOGD_HW = 0x00000001, /* Hardware detection and info */
LOGD_PLATFORM = 0x00000001, /* Platform services */
LOGD_RFKILL = 0x00000002,
LOGD_ETHER = 0x00000004,
LOGD_WIFI = 0x00000008,
@@ -61,6 +61,7 @@ enum {
#define LOGD_DHCP (LOGD_DHCP4 | LOGD_DHCP6)
#define LOGD_IP (LOGD_IP4 | LOGD_IP6)
#define LOGD_HW LOGD_PLATFORM
/* Log levels */
enum {