mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-02-02 09:47:03 +03:00
environment-d-generator: output logs in debug mode
Those codepaths is only used by that generator, so simply adding a few debug log lines should be OK. Fixes #12259.
This commit is contained in:
parent
3a5a08bbb4
commit
f6301bdc81
@ -485,6 +485,8 @@ static int merge_env_file_push(
|
||||
|
||||
free_and_replace(value, expanded_value);
|
||||
|
||||
log_debug("%s:%u: setting %s=%s", filename, line, key, value);
|
||||
|
||||
return load_env_file_push(filename, line, key, value, env, n_pushed);
|
||||
}
|
||||
|
||||
|
@ -28,6 +28,13 @@ static int environment_dirs(char ***ret) {
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
if (DEBUG_LOGGING) {
|
||||
_cleanup_free_ char *t;
|
||||
|
||||
t = strv_join(dirs, "\n\t");
|
||||
log_debug("Looking for environment.d files in (higher priority first):\n\t%s", strna(t));
|
||||
}
|
||||
|
||||
*ret = TAKE_PTR(dirs);
|
||||
return 0;
|
||||
}
|
||||
@ -49,6 +56,8 @@ static int load_and_print(void) {
|
||||
* that in case of failure, a partial update is better than none. */
|
||||
|
||||
STRV_FOREACH(i, files) {
|
||||
log_debug("Reading %s…", *i);
|
||||
|
||||
r = merge_env_file(&env, NULL, *i);
|
||||
if (r == -ENOMEM)
|
||||
return r;
|
||||
|
Loading…
x
Reference in New Issue
Block a user