From 17476318b9e0f4e2c9b515b1f63c74a0f37f1596 Mon Sep 17 00:00:00 2001 From: Sitaram Chamarty Date: Sun, 11 Mar 2012 09:26:12 +0530 Subject: [PATCH] (trace) formatting changed when more than one arg passed --- src/Gitolite/Common.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Gitolite/Common.pm b/src/Gitolite/Common.pm index 6c62403..d2f2cea 100644 --- a/src/Gitolite/Common.pm +++ b/src/Gitolite/Common.pm @@ -39,10 +39,11 @@ sub say2 { sub trace { return unless defined( $ENV{D} ); - my $level = shift; + my $level = shift; return if $ENV{D} < $level; my $args = ''; $args = join( ", ", @_ ) if @_; my $sub = ( caller 1 )[3] || ''; $sub =~ s/.*://; $sub .= ' ' x ( 32 - length($sub) ); - say2 "TRACE $level $sub", $args if $ENV{D} >= $level; + say2 "TRACE $level $sub", (@_ ? shift : ()); + say2("TRACE $level " . (" " x 32), $_)for @_; } sub dbg {