From 9f0cd750cb57f0c3b920cc1fc5c110e27dbae7da Mon Sep 17 00:00:00 2001 From: Web Admin <w3adm@sanger.ac.uk> Date: Fri, 7 Sep 2007 11:08:51 +0000 Subject: [PATCH] merge from vega-44-dev --- modules/Bio/EnsEMBL/Utils/ConversionSupport.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/Bio/EnsEMBL/Utils/ConversionSupport.pm b/modules/Bio/EnsEMBL/Utils/ConversionSupport.pm index 820d1d0e4b..54d1b33f51 100644 --- a/modules/Bio/EnsEMBL/Utils/ConversionSupport.pm +++ b/modules/Bio/EnsEMBL/Utils/ConversionSupport.pm @@ -1165,6 +1165,7 @@ sub log { Arg[1] : String $txt - the warning text to log 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; $support->log_warning('Log foo.\n', 1); Description : Logs a message via $self->log and increases the warning counter. @@ -1175,8 +1176,9 @@ sub log { =cut sub log_warning { - my ($self, $txt, $indent) = @_; - $txt = "\nWARNING: " . $txt; + my ($self, $txt, $indent, $break) = @_; + $txt = "WARNING: " . $txt; + $txt = "\n$txt" if ($break); $self->log($txt, $indent); $self->{'_warnings'}++; return(1); -- GitLab