You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-08-18 20:41:58 +03:00
Added the log-level-stderr option.
Controls whether console log messages are sent to stderr or stdout. By default this is set to warn which represents a change in behavior from previous versions, even though it may be more intuitive. Setting log-level-stderr=off will preserve the old behavior. Suggested by Sascha Biberhofer.
This commit is contained in:
@@ -575,7 +575,21 @@ sub backrestConfig
|
||||
|
||||
$oHost->copyTo($strLocalFile, $$hCacheKey{file}, $oConfig->paramGet('owner', false, 'postgres:postgres'), '640');
|
||||
|
||||
$strConfig = fileStringRead($strLocalFile);
|
||||
# Remove the log-console-stderr option before pushing into the cache
|
||||
# ??? This is not very pretty and should be replaced with a general way to hide config options
|
||||
my $oConfigClean = dclone($self->{config}{$strHostName}{$$hCacheKey{file}});
|
||||
delete($$oConfigClean{&CONFIG_SECTION_GLOBAL}{&OPTION_LOG_LEVEL_STDERR});
|
||||
|
||||
if (keys(%{$$oConfigClean{&CONFIG_SECTION_GLOBAL}}) == 0)
|
||||
{
|
||||
delete($$oConfigClean{&CONFIG_SECTION_GLOBAL});
|
||||
}
|
||||
|
||||
iniSave("${strLocalFile}.clean", $oConfigClean, true);
|
||||
|
||||
# Push config file into the cache
|
||||
$strConfig = fileStringRead("${strLocalFile}.clean");
|
||||
|
||||
my @stryConfig = undef;
|
||||
|
||||
if (trim($strConfig) ne '')
|
||||
|
Reference in New Issue
Block a user