You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-06-27 00:21:08 +02: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:
@ -158,6 +158,7 @@ use constant ERROR_UNKNOWN => ERROR_MAX
|
||||
sub new
|
||||
{
|
||||
my $class = shift; # Class name
|
||||
my $strLevel = shift; # Log level
|
||||
my $iCode = shift; # Error code
|
||||
my $strMessage = shift; # ErrorMessage
|
||||
my $strTrace = shift; # Stack trace
|
||||
@ -172,6 +173,7 @@ sub new
|
||||
bless $self, $class;
|
||||
|
||||
# Initialize exception
|
||||
$self->{strLevel} = $strLevel;
|
||||
$self->{iCode} = $iCode;
|
||||
$self->{strMessage} = $strMessage;
|
||||
$self->{strTrace} = $strTrace;
|
||||
@ -179,6 +181,16 @@ sub new
|
||||
return $self;
|
||||
}
|
||||
|
||||
####################################################################################################################################
|
||||
# level
|
||||
####################################################################################################################################
|
||||
sub level
|
||||
{
|
||||
my $self = shift;
|
||||
|
||||
return $self->{strLevel};
|
||||
}
|
||||
|
||||
####################################################################################################################################
|
||||
# CODE
|
||||
####################################################################################################################################
|
||||
|
Reference in New Issue
Block a user