Commit 9f0cd750 authored by Web Admin's avatar Web Admin
Browse files

merge from vega-44-dev

parent d095755d
...@@ -1165,6 +1165,7 @@ sub log { ...@@ -1165,6 +1165,7 @@ sub log {
Arg[1] : String $txt - the warning text to log Arg[1] : String $txt - the warning text to log
Arg[2] : Int $indent - indentation level for log message Arg[2] : Int $indent - indentation level for log message
Arg[2] : Bool - add a line break before warning if true
Example : my $log = $support->log_filehandle; Example : my $log = $support->log_filehandle;
$support->log_warning('Log foo.\n', 1); $support->log_warning('Log foo.\n', 1);
Description : Logs a message via $self->log and increases the warning counter. Description : Logs a message via $self->log and increases the warning counter.
...@@ -1175,8 +1176,9 @@ sub log { ...@@ -1175,8 +1176,9 @@ sub log {
=cut =cut
sub log_warning { sub log_warning {
my ($self, $txt, $indent) = @_; my ($self, $txt, $indent, $break) = @_;
$txt = "\nWARNING: " . $txt; $txt = "WARNING: " . $txt;
$txt = "\n$txt" if ($break);
$self->log($txt, $indent); $self->log($txt, $indent);
$self->{'_warnings'}++; $self->{'_warnings'}++;
return(1); return(1);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment