Author: arkurth
Date: Wed May 13 15:27:35 2009
New Revision: 774401

URL: http://svn.apache.org/viewvc?rev=774401&view=rev
Log:
Made minor changes to a few of the notify() messages in State.pm. Some 'OK' 
messages were changed to 'DEBUG' so they wouldn't be displayed if verbose mode 
is disabled. A few useless messages were also removed.

Modified:
    incubator/vcl/trunk/managementnode/lib/VCL/Module/State.pm

Modified: incubator/vcl/trunk/managementnode/lib/VCL/Module/State.pm
URL: 
http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/Module/State.pm?rev=774401&r1=774400&r2=774401&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/Module/State.pm (original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/Module/State.pm Wed May 13 
15:27:35 2009
@@ -84,7 +84,7 @@
 
        # Attempt to get a database handle
        if ($ENV{dbh} = getnewdbh()) {
-               notify($ERRORS{'OK'}, 0, "obtained a database handle for this 
state process, stored as \$ENV{dbh}");
+               notify($ERRORS{'DEBUG'}, 0, "obtained a database handle for 
this state process, stored as \$ENV{dbh}");
        }
        else {
                notify($ERRORS{'WARNING'}, 0, "unable to obtain a database 
handle for this state process");
@@ -119,22 +119,21 @@
 
        # Attempt to load the computer provisioning module
        if ($provisioning_perl_package) {
-               notify($ERRORS{'OK'}, 0, "attempting to load provisioning 
module: $provisioning_perl_package");
+               notify($ERRORS{'DEBUG'}, 0, "attempting to load provisioning 
module: $provisioning_perl_package");
                eval "use $provisioning_perl_package";
                if ($EVAL_ERROR) {
-                       notify($ERRORS{'WARNING'}, 0, 
"$provisioning_perl_package module could not be loaded");
-                       notify($ERRORS{'OK'},      0, "returning 0");
+                       notify($ERRORS{'WARNING'}, 0, 
"$provisioning_perl_package module could not be loaded, returning 0");
                        return 0;
                }
-               notify($ERRORS{'OK'}, 0, "$provisioning_perl_package module 
successfully loaded");
+               notify($ERRORS{'DEBUG'}, 0, "$provisioning_perl_package module 
loaded");
 
                # Create provisioner object
                if (my $provisioner = 
($provisioning_perl_package)->new({data_structure => $self->data})) {
-                       notify($ERRORS{'OK'}, 0, ref($provisioner) . " 
provisioner object successfully created");
+                       notify($ERRORS{'OK'}, 0, ref($provisioner) . " 
provisioner object created");
                        $self->{provisioner} = $provisioner;
                }
                else {
-                       notify($ERRORS{'OK'}, 0, "provisioning object could not 
be created, returning 0");
+                       notify($ERRORS{'WARNING'}, 0, "provisioning object 
could not be created, returning 0");
                        return 0;
                }
        } ## end if ($provisioning_perl_package)
@@ -144,15 +143,16 @@
 
        # Attempt to load the OS module
        if ($os_perl_package) {
-               notify($ERRORS{'OK'}, 0, "attempting to load OS module: 
$os_perl_package");
+               notify($ERRORS{'DEBUG'}, 0, "attempting to load OS module: 
$os_perl_package");
                eval "use $os_perl_package";
                if ($EVAL_ERROR) {
-                       notify($ERRORS{'WARNING'}, 0, "$os_perl_package module 
could not be loaded");
-                       notify($ERRORS{'OK'},      0, "returning 0");
+                       notify($ERRORS{'WARNING'}, 0, "$os_perl_package module 
could not be loaded, returning 0");
                        return 0;
                }
+               notify($ERRORS{'DEBUG'}, 0, "$os_perl_package module loaded");
+
                if (my $os = ($os_perl_package)->new({data_structure => 
$self->data})) {
-                       notify($ERRORS{'OK'}, 0, ref($os) . " OS object 
successfully created");
+                       notify($ERRORS{'OK'}, 0, ref($os) . " OS object 
created");
                        $self->{os} = $os;
                }
                else {
@@ -167,7 +167,7 @@
        $self->{provisioner}->set_os($self->{os});
        $self->{os}->set_provisioner($self->{provisioner});
 
-       notify($ERRORS{'OK'}, 0, "returning 1");
+       notify($ERRORS{'DEBUG'}, 0, "returning 1");
        return 1;
 
 } ## end sub initialize


Reply via email to