From cbca0e587838417a0f5346f7f0ee680003bf2629 Mon Sep 17 00:00:00 2001 From: lissav Date: Sat, 29 Sep 2012 10:40:25 +0000 Subject: [PATCH] add support for sinfo tag git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13916 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/MsgUtils.pm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/perl-xCAT/xCAT/MsgUtils.pm b/perl-xCAT/xCAT/MsgUtils.pm index b612799ce..d26fea205 100644 --- a/perl-xCAT/xCAT/MsgUtils.pm +++ b/perl-xCAT/xCAT/MsgUtils.pm @@ -133,7 +133,8 @@ This program module file, supports the xcat messaging and logging D - DATA goes to STDOUT E - error. This type of message will be sent to STDERR. - I - informational goes to STDOUT + si - informational status info (sinfo) + I - informational goes to STDOUT N - Node informational goes to STDOUT S - Message will be logged to syslog ( severe error) Note S can be combined with other flags for example @@ -209,12 +210,14 @@ This program module file, supports the xcat messaging and logging $rsp->{node}->[0]->{data}->[0] ="mydata"; xCAT::MsgUtils->message("N", $rsp, $callback); - - my $rsp = {}; $rsp->{info}->[0] = "No hosts in node list\n"; xCAT::MsgUtils->message("I", $rsp, $::CALLBACK); + my $rsp = {}; + $rsp->{sinfo}->[0] = "No hosts in node list\n"; + xCAT::MsgUtils->message("IS", $rsp, $::CALLBACK); + my $rsp = {}; $rsp->{warning}->[0] = "No hosts in node list\n"; @@ -271,7 +274,7 @@ sub message my $call_back = shift; # optional my $exitcode = shift; # optional - # should be I, D, E, S, SA ,LS, W , L,N + # should be I,IS, D, E, S, SA ,LS, W , L,N # or S(I, D, E, S, W, L,N) # # if new SA option need to split syslog messages from auditlog entry @@ -353,6 +356,7 @@ sub message my $sevkey; if ($sev =~ /D/) { $sevkey = 'data'; } elsif ($sev =~ /N/) { $sevkey = 'node'; } + elsif ($sev =~ /IS/) { $sevkey = 'sinfo'; } elsif ($sev =~ /I/) { $sevkey = 'info'; } elsif ($sev =~ /W/) { $sevkey = 'warning'; } elsif ($sev =~ /E/)