Skip to content

Commit

Permalink
Tune diagnostic logging that happens during mce startup
Browse files Browse the repository at this point in the history
Running "mce -Tv" from command line should not show insignificant info.

Demote non-interesting diagnostic to INFO level.

Avoid emitting warnings about illegal display state requests that
happen due to request filtering.
  • Loading branch information
spiiroin committed Jan 16, 2015
1 parent b0804be commit 49065f8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion builtin-gconf.c
Expand Up @@ -1576,7 +1576,7 @@ static void gconf_client_save_values(GConfClient *self, const char *path)
size_t size = 0;
FILE *file = 0;

mce_log(LL_NOTICE, "updating %s", path);
mce_log(LL_INFO, "updating %s", path);

if( !(file = open_memstream(&data, &size)) ) {
goto cleanup;
Expand Down
2 changes: 1 addition & 1 deletion mce-io.c
Expand Up @@ -351,7 +351,7 @@ static mce_io_mon_t *mce_io_mon_create(const char *path, mce_io_mon_delete_cb de
self->user_data = 0;
self->user_free_cb = 0;

mce_log(LL_NOTICE, "adding monitor for: %s", self->path);
mce_log(LL_DEBUG, "adding monitor for: %s", self->path);

EXIT:
return self;
Expand Down
9 changes: 8 additions & 1 deletion modules/display.c
Expand Up @@ -1229,6 +1229,13 @@ static void mdy_datapipe_display_state_req_cb(gconstpointer data)
case MCE_DISPLAY_POWER_UP:
case MCE_DISPLAY_POWER_DOWN:
/* Ignore transient or otherwise invalid display states */

/* Any "no-change" transient state requests practically
* have to be side effects of display state request
* filtering - no need to make fuzz about them */
if( next_state == display_state )
break;

mce_log(LL_WARN, "%s is not valid target state; ignoring",
mdy_display_state_name(next_state));
break;
Expand Down Expand Up @@ -6291,7 +6298,7 @@ static governor_setting_t *mdy_governor_get_settings(const char *tag)
snprintf(sec, sizeof sec, "CPUScalingGovernor%s", tag);

if( !mce_conf_has_group(sec) ) {
mce_log(LL_NOTICE, "Not configured: %s", sec);
mce_log(LL_INFO, "Not configured: %s", sec);
goto EXIT;
}

Expand Down

0 comments on commit 49065f8

Please sign in to comment.