vcl-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fapee...@apache.org
Subject svn commit: r752868 - /incubator/vcl/trunk/managementnode/lib/VCL/utils.pm
Date Thu, 12 Mar 2009 13:55:43 GMT
Author: fapeeler
Date: Thu Mar 12 13:55:42 2009
New Revision: 752868

URL: http://svn.apache.org/viewvc?rev=752868&view=rev
Log:
VCL-106

Seperated the critical and information section of notify routine. The critical notices caputure
the last 100 lines of the vcld.log file the informational notices are for folks that have
emails disabled. By doing this it can shave 20 or more secs off the wait time for the connect
button to show.


Modified:
    incubator/vcl/trunk/managementnode/lib/VCL/utils.pm

Modified: incubator/vcl/trunk/managementnode/lib/VCL/utils.pm
URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/utils.pm?rev=752868&r1=752867&r2=752868&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/utils.pm (original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/utils.pm Thu Mar 12 13:55:42 2009
@@ -716,9 +716,9 @@
 		chomp $formatted_data;
 	}
 
-	# Assemble an email message body if CRITICAL or MAILMASTERS
+	# Assemble an email message body if CRITICAL
 	my $body;
-	if ($error == 2 || ($error == 5 && $SHARED_MAILBOX)) {
+	if ($error == 2 ) {
 		# Get the previous several log file entries for this process
 		my $log_history_count = 100;
 		my $log_history       = "RECENT LOG ENTRIES FOR THIS PROCESS:\n";
@@ -740,7 +740,7 @@
 
 		# Add the formatted data to the message body if data was passed
 		$body .= "\n\n$formatted_data\n" if $formatted_data;
-	} ## end if ($error == 2 || ($error == 5 && $SHARED_MAILBOX...
+	} ## end if ($error == 2) 
 
 
 	# OK, VERBOSE
@@ -770,6 +770,17 @@
 		my $to      = $SHARED_MAILBOX;
 		my $from    = "root\@$FQDN";
 		my $subject = "Informational -- $filename";
+
+		# Assemble the e-mail message body
+		$body = <<"END";
+$string
+
+Time: $currenttime
+PID: $PID
+Caller: $caller_info
+
+END
+
 		mail($to, $subject, $body, $from);
 	}
 



Mime
View raw message