logging: move to XDG_CACHE_HOME (#13739)

while there is some controversy, stdpath('cache') looks like  a better fit for logs than stdpath('data'): you can remove logs without preventing nvim to work which fits the XDG_CACHE_HOME definition of `user specific non-essential data files`.
This commit is contained in:
Michael Lingelbach
2021-01-13 14:20:21 -08:00
committed by GitHub
parent 77a6049e07
commit ea8756f85d
7 changed files with 29 additions and 19 deletions

View File

@@ -108,6 +108,17 @@ char *get_xdg_home(const XDGVarType idx)
return dir;
}
/// Return subpath of $XDG_CACHE_HOME
///
/// @param[in] fname New component of the path.
///
/// @return [allocated] `$XDG_CACHE_HOME/nvim/{fname}`
char *stdpaths_user_cache_subpath(const char *fname)
FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ALL FUNC_ATTR_NONNULL_RET
{
return concat_fnames_realloc(get_xdg_home(kXDGCacheHome), fname, true);
}
/// Return subpath of $XDG_CONFIG_HOME
///
/// @param[in] fname New component of the path.