From: Don Armstrong Date: Fri, 29 Dec 2017 21:39:53 +0000 (-0800) Subject: quotemeta in debug, error, and warn X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;ds=sidebyside;h=2a105f1e4a7325741fea2664e5cc8dd7deea842d;p=infobot.git quotemeta in debug, error, and warn --- diff --git a/src/logger.pl b/src/logger.pl index 37de334..66c925a 100644 --- a/src/logger.pl +++ b/src/logger.pl @@ -174,13 +174,13 @@ sub DEBUG { return unless ( &IsParam('DEBUG') ); my (undef,undef,$line,$subroutine,undef) = caller(1); - &status("${b_green}!DEBUG!$ob ".$subroutine.'['.$line."] $_[0]"); + &status("${b_green}!DEBUG!$ob ".$subroutine.'['.$line."] ".quotemeta($_[0])); } sub ERROR { my (undef,undef,$line,$subroutine,undef) = caller(1); - &status("${b_red}!ERROR!$ob ".$subroutine.'['.$line."] $_[0]"); + &status("${b_red}!ERROR!$ob ".$subroutine.'['.$line."] ".quotemeta($_[0])); } sub WARN { @@ -190,19 +190,19 @@ sub WARN { my ($package,$filename,$line,$subroutine,undef) = caller(1); - &status("${b_yellow}!WARN!$ob ".$subroutine.'['.$line."] $_[0]"); + &status("${b_yellow}!WARN!$ob ".$subroutine.'['.$line."] ".quotemeta($_[0])); } sub FIXME { my ($package,$filename,$line,$subroutine,undef) = caller(1); - &status("${b_cyan}!FIXME!$ob ".$subroutine.'['.$line."] $_[0]"); + &status("${b_cyan}!FIXME!$ob ".$subroutine.'['.$line."] ".quotemeta($_[0])); } sub TODO { my ($package,$filename,$line,$subroutine,undef) = caller(1); - &status("${b_cyan}!TODO!$ob ".$subroutine.'['.$line."] $_[0]"); + &status("${b_cyan}!TODO!$ob ".$subroutine.'['.$line."] ".quotemeta($_[0])); } sub VERB {