mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
desktop-entry.c: don't demote error messages with LABWC_DEBUG_LIBSFDO
Also add additional logging to tell users how to get more information about failures to load the icon theme.
This commit is contained in:
parent
cb0a4b875e
commit
814af0ae4d
1 changed files with 13 additions and 2 deletions
|
|
@ -37,9 +37,10 @@ log_handler(enum sfdo_log_level level, const char *fmt, va_list args, void *tag)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* To avoid logging issues with .desktop files as errors, all libsfdo
|
* To avoid logging issues with .desktop files as errors, all libsfdo
|
||||||
* error-logging is demoted to info level.
|
* error-logging is demoted to info level unless running with
|
||||||
|
* LABWC_DEBUG_LIBSFDO.
|
||||||
*/
|
*/
|
||||||
if (level == SFDO_LOG_LEVEL_ERROR) {
|
if (!debug_libsfdo && level == SFDO_LOG_LEVEL_ERROR) {
|
||||||
level = SFDO_LOG_LEVEL_INFO;
|
level = SFDO_LOG_LEVEL_INFO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -117,6 +118,12 @@ desktop_entry_init(struct server *server)
|
||||||
*/
|
*/
|
||||||
wlr_log(WLR_ERROR, "Failed to load icon theme %s, falling back to 'hicolor'",
|
wlr_log(WLR_ERROR, "Failed to load icon theme %s, falling back to 'hicolor'",
|
||||||
rc.icon_theme_name);
|
rc.icon_theme_name);
|
||||||
|
|
||||||
|
if (!debug_libsfdo) {
|
||||||
|
wlr_log(WLR_ERROR, "Further information is available by setting "
|
||||||
|
"the LABWC_DEBUG_LIBSFDO=1 env var before starting labwc");
|
||||||
|
}
|
||||||
|
|
||||||
sfdo->icon_theme = sfdo_icon_theme_load(
|
sfdo->icon_theme = sfdo_icon_theme_load(
|
||||||
sfdo->icon_ctx, "hicolor", load_options);
|
sfdo->icon_ctx, "hicolor", load_options);
|
||||||
}
|
}
|
||||||
|
|
@ -141,6 +148,10 @@ err_desktop_ctx:
|
||||||
err_basedir_ctx:
|
err_basedir_ctx:
|
||||||
free(sfdo);
|
free(sfdo);
|
||||||
wlr_log(WLR_ERROR, "Failed to initialize icon loader");
|
wlr_log(WLR_ERROR, "Failed to initialize icon loader");
|
||||||
|
if (!debug_libsfdo) {
|
||||||
|
wlr_log(WLR_ERROR, "Further information is available by setting "
|
||||||
|
"the LABWC_DEBUG_LIBSFDO=1 env var before starting labwc");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue