change all logger calls to put xcat msgs into local4

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12212 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
immarvin 2012-04-12 05:45:09 +00:00
parent c07ec5a185
commit 2dbc51d2d7

View File

@ -55,7 +55,7 @@ my $DBname = xCAT::Utils->get_DBName;
if ($DBname ne "DB2") {
print " Inspect of table only supported for DB2 database\n";
`logger -txcat "insptbls:Only supports DB2 database"` ;
`logger -p local4.err -txcat "insptbls:Only supports DB2 database"` ;
exit 1;
}
@ -66,7 +66,7 @@ if ($tablelist) { # input list of tables
@tablist = xCAT::Utils->runcmd($cmd, 0);
if ($::RUNCMD_RC != 0)
{
`logger -txcat " insptbls:error in select tabname from syscat.tables"` ;
`logger -p local4.err -txcat " insptbls:error in select tabname from syscat.tables"` ;
exit 1;
}
}
@ -106,26 +106,26 @@ foreach my $table (@tablist) {
xCAT::Utils->runcmd($cmd, 0);
if ($::RUNCMD_RC != 0)
{
`logger -txcat " insptbls:error $cmd"`;
`logger -p local4.warning -txcat " insptbls:error $cmd"`;
} else {
`logger -txcat " insptbls: $cmd"`;
`logger -p local4.info -txcat " insptbls: $cmd"`;
}
$cmd="$::XCATROOT/sbin/runsqlcmd \"INSPECT ROWCOMPESTIMATE TABLE NAME $table results keep $table.res;\"";
xCAT::Utils->runcmd($cmd, 0);
if ($::RUNCMD_RC != 0)
{
`logger -txcat " insptbls:error INSPECT ROWCOMPESTIMATE TABLE NAME $table"`;
`logger -p local4.warning -txcat " insptbls:error INSPECT ROWCOMPESTIMATE TABLE NAME $table"`;
} else {
`logger -txcat " insptbls: INSPECT ROWCOMPESTIMATE TABLE NAME $table"`;
`logger -p local4.info -txcat " insptbls: INSPECT ROWCOMPESTIMATE TABLE NAME $table"`;
}
$cmd=" \"db2inspf $execdir$table.res /tmp/$table.out;\"";
system("su - xcatdb -c $cmd");
if ($? > 0) # error
{
`logger -txcat "insptbls:error db2inspf $table.res"`;
`logger -p local4.warning -txcat "insptbls:error db2inspf $table.res"`;
} else {
`logger -txcat " insptbls:db2inspf $table.res"`;
`logger -p local4.info -txcat " insptbls:db2inspf $table.res"`;
}
}
exit 0;