From fe07e57ff2393e2e6842561301d85a03794b4bd6 Mon Sep 17 00:00:00 2001 From: dms Date: Sat, 9 Sep 2000 16:24:25 +0000 Subject: [PATCH] supressed subroutine redefined warning. Added sql debug support (open/close) git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@79 c11ca15a-4712-0410-83d8-924469b57eb5 --- src/logger.pl | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/logger.pl b/src/logger.pl index 454b363..dfb64e0 100644 --- a/src/logger.pl +++ b/src/logger.pl @@ -162,6 +162,8 @@ sub ERROR { sub WARN { return unless (&IsParam("WARN")); + return if ($_[0] =~ /^PERL: Subroutine \S+ redefined at/); + &status("${b_yellow}!WARN!$ob $_[0]"); } @@ -312,4 +314,21 @@ sub status { print LOG sprintf("%s %s\n", $date, $input); } +sub openSQLDebug { + if (!open(SQLDEBUG, $param{'SQLDebug'})) { + &ERROR("cannot open $param{'SQLDebug'}..."); + delete $param{'SQLDebug'}; + return 0; + } + + &status("Opened SQL Debug file: $param{'SQLDebug'}"); + return 1; +} + +sub closeSQLDebug { + close SQLDEBUG; + + &status("Closed SQL Debug file: $param{'SQLDebug'}"); +} + 1; -- 2.39.2