Skip to content

Commit

Permalink
Tune logging levels
Browse files Browse the repository at this point in the history
Make things less noisy by default.

Use mce specific LL_xxx levels instead of syslog LOG_xxx ones.
  • Loading branch information
spiiroin committed Jan 14, 2014
1 parent 1b2cb8b commit 327f33b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions mce-gconf.c
Expand Up @@ -322,7 +322,7 @@ gboolean mce_gconf_notifier_add(const gchar *path, const gchar *key,
GCONF_CLIENT_PRELOAD_NONE, &error);

if (error != NULL) {
mce_log(LL_CRIT,
mce_log(LL_WARN,
"Could not add %s to directories watched by "
"GConf client setting from GConf; %s",
path, error->message);
Expand All @@ -334,7 +334,7 @@ gboolean mce_gconf_notifier_add(const gchar *path, const gchar *key,
*cb_id = gconf_client_notify_add(gconf_client, key, callback,
NULL, NULL, &error);
if (error != NULL) {
mce_log(LL_CRIT,
mce_log(LL_WARN,
"Could not register notifier for %s; %s",
key, error->message);
//goto EXIT;
Expand Down
10 changes: 5 additions & 5 deletions mce-sensorfw.c
Expand Up @@ -300,26 +300,26 @@ mce_sensorfw_load_sensor(const char *id)
DBUS_TYPE_STRING, &id,
DBUS_TYPE_INVALID);
if( !msg ) {
mce_log(LOG_ERR, "loadPlugin(%s): no reply", id);
mce_log(LL_ERR, "loadPlugin(%s): no reply", id);
goto EXIT;
}

if( dbus_set_error_from_message(&err, msg) ) {
mce_log(LOG_ERR, "loadPlugin(%s): error reply: %s: %s",
mce_log(LL_ERR, "loadPlugin(%s): error reply: %s: %s",
id, err.name, err.message);
goto EXIT;
}

if( !dbus_message_get_args(msg, &err,
DBUS_TYPE_BOOLEAN, &ack,
DBUS_TYPE_INVALID) ) {
mce_log(LOG_ERR, "loadPlugin(%s): parse reply: %s: %s",
mce_log(LL_ERR, "loadPlugin(%s): parse reply: %s: %s",
id, err.name, err.message);
goto EXIT;
}

if( !ack ) {
mce_log(LOG_WARNING, "loadPlugin(%s): request denied", id);
mce_log(LL_WARN, "loadPlugin(%s): request denied", id);
goto EXIT;
}

Expand Down Expand Up @@ -2245,7 +2245,7 @@ void mce_sensorfw_ps_attach(int fd)
if( ioctl(fd, EVIOCGABS(ABS_DISTANCE), &info) == -1 )
mce_log(LL_ERR, "EVIOCGABS(%s): %m", "ABS_DISTANCE");
else {
mce_log(LL_CRIT, "PS: %d (initial)", info.value);
mce_log(LL_NOTICE, "PS: %d (initial)", info.value);
ps_notify(info.value < 1, DS_EVDEV);
}

Expand Down

0 comments on commit 327f33b

Please sign in to comment.