From 2c1ca63a3d39bc10dc8388eeaecf551bb9051301 Mon Sep 17 00:00:00 2001 From: lissav Date: Fri, 22 Aug 2008 16:22:58 +0000 Subject: [PATCH] change calls to syslog to MsgUtils interface git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2057 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/MacMap.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/perl-xCAT/xCAT/MacMap.pm b/perl-xCAT/xCAT/MacMap.pm index 7133a4ca6..d9dfc23cf 100644 --- a/perl-xCAT/xCAT/MacMap.pm +++ b/perl-xCAT/xCAT/MacMap.pm @@ -3,6 +3,7 @@ package xCAT::MacMap; use xCAT::Table; use xCAT::Utils; +use xCAT::MsgUtils; use IO::Select; use IO::Handle; use Sys::Syslog; @@ -125,7 +126,7 @@ sub refresh_table { if (defined($entry->{switch}) and $entry->{switch} ne "" and defined($entry->{port}) and $entry->{port} ne "") { $self->{switches}->{$entry->{switch}}->{$entry->{port}}=$entry->{node}; } else { - syslog("local4|err","xCAT Table error:".$entry->{node}."Has missing or invalid switch.switch and/or switch.port fields"); + xCAT::MsgUtils->message("S","xCAT Table error:".$entry->{node}."Has missing or invalid switch.switch and/or switch.port fields"); } } my $children = 0; @@ -183,7 +184,7 @@ sub walkoid { my $varbind = new SNMP::Varbind([$oid,'']); $session->getnext($varbind); if ($session->{ErrorStr}) { - syslog("local6|err","Error communicating with ".$session->{DestHost}.": ".$session->{ErrorStr}); + xCAT::MsgUtils->message("S","Error communicating with ".$session->{DestHost}.": ".$session->{ErrorStr}); return undef; } my $count=0; @@ -213,7 +214,7 @@ sub refresh_switch { UseNumeric => 1 ); #if ($error) { die $error; } - unless ($session) { syslog("err","Failed to communicate with $switch"); return; } + unless ($session) { xCAT::MsgUtils->message("S","Failed to communicate with $switch"); return; } my $namemap = walkoid($session,'.1.3.6.1.2.1.31.1.1.1.1'); if ($namemap) { my $ifnamesupport=0; #Assume broken ifnamesupport until proven good... (Nortel switch)