[interchange-cvs] interchange - jon modified lib/Vend/Interpolate.pm

interchange-core@icdevgroup.org interchange-core@icdevgroup.org
Tue Oct 29 12:10:47 2002


User:      jon
Date:      2002-10-29 17:04:33 GMT
Modified:  lib/Vend Interpolate.pm
Log:
Make it easy for log tag to send to debug:

[log type=debug]...[/log]

Revision  Changes    Path
2.122     +7 -4      interchange/lib/Vend/Interpolate.pm


rev 2.122, prev_rev 2.121
Index: Interpolate.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Interpolate.pm,v
retrieving revision 2.121
retrieving revision 2.122
diff -u -u -r2.121 -r2.122
--- Interpolate.pm	23 Oct 2002 16:58:12 -0000	2.121
+++ Interpolate.pm	29 Oct 2002 17:04:32 -0000	2.122
@@ -1,6 +1,6 @@
 # Vend::Interpolate - Interpret Interchange tags
 # 
-# $Id: Interpolate.pm,v 2.121 2002/10/23 16:58:12 jon Exp $
+# $Id: Interpolate.pm,v 2.122 2002/10/29 17:04:32 jon Exp $
 #
 # Copyright (C) 1996-2002 Red Hat, Inc. <interchange@redhat.com>
 #
@@ -27,7 +27,7 @@
 require Exporter;
 @ISA = qw(Exporter);
 
-$VERSION = substr(q$Revision: 2.121 $, 10);
+$VERSION = substr(q$Revision: 2.122 $, 10);
 
 @EXPORT = qw (
 
@@ -2446,10 +2446,13 @@
 				or last;
 		}
 	}
-	elsif($opt->{type} =~ /^error/) {
-		if($opt->{file}) {
+	elsif($opt->{type} =~ /^(?:error|debug)/) {
+		if ($opt->{file}) {
 			$data = format_log_msg($data) unless $data =~ s/^\\//;;
 			$status = Vend::Util::writefile($file, $data, $opt);
+		}
+		elsif ($opt->{type} =~ /^debug/) {
+			$status = Vend::Util::logDebug($data);
 		}
 		else {
 			$status = Vend::Util::logError($data);