mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-21 19:22:05 +00:00
Fix sourceforge bug #4691 Use a consistent log tag for xCAT log
This commit is contained in:
parent
ca4437270a
commit
ce9430d280
@ -470,7 +470,7 @@ sub message
|
||||
{
|
||||
# If they want this msg to also go to syslog, do that now
|
||||
eval {
|
||||
openlog("xCAT", "nofatal,pid", "local4");
|
||||
openlog("xcat", "nofatal,pid", "local4");
|
||||
if ($sev eq 'SE') {
|
||||
syslog("err", $rsp);
|
||||
} else {
|
||||
@ -516,7 +516,7 @@ sub message
|
||||
{
|
||||
print $stdouterrf "Unable to open auditlog\n";
|
||||
eval {
|
||||
openlog("xCAT", "nofatal,pid", "local4");
|
||||
openlog("xcat", "nofatal,pid", "local4");
|
||||
syslog("err", "Unable to write to auditlog");
|
||||
closelog();
|
||||
};
|
||||
@ -533,7 +533,7 @@ sub message
|
||||
{ # error
|
||||
print $stdouterrf "Unable to open auditlog\n";
|
||||
eval {
|
||||
openlog("xCAT", "nofatal,pid", "local4");
|
||||
openlog("xcat", "nofatal,pid", "local4");
|
||||
syslog("err", "Unable to open auditlog");
|
||||
closelog();
|
||||
};
|
||||
|
@ -83,7 +83,7 @@ int main(int argc, char *argv[]) {
|
||||
if (strcmp(argv[i], "-V") == 0) {
|
||||
verbose = 1;
|
||||
setlogmask(LOG_UPTO(LOG_DEBUG));
|
||||
openlog("proxydhcp", LOG_NDELAY, LOG_LOCAL0);
|
||||
openlog("xcat", LOG_NDELAY, LOG_LOCAL0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -276,7 +276,3 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
if (verbose) { closelog();}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -81,7 +81,7 @@ function submit_request($req, $skipVerify, $opts_array){
|
||||
|
||||
// Open syslog, include the process ID and also send the log to standard error,
|
||||
// and use a user defined logging mechanism
|
||||
openlog("xCAT-UI", LOG_PID | LOG_PERROR, LOG_LOCAL0);
|
||||
openlog("xcat", LOG_PID | LOG_PERROR, LOG_LOCAL0);
|
||||
|
||||
// Open a socket to xcatd
|
||||
syslog(LOG_INFO, "Opening socket to xcatd...");
|
||||
|
@ -79,7 +79,7 @@ function submit_request($req, $skipVerify, $opts_array){
|
||||
// Open syslog, include the process ID and also send
|
||||
// the log to standard error, and use a user defined
|
||||
// logging mechanism
|
||||
openlog("xCAT-UI", LOG_PID | LOG_PERROR, LOG_LOCAL0);
|
||||
openlog("xcat", LOG_PID | LOG_PERROR, LOG_LOCAL0);
|
||||
|
||||
// Open a socket to xcatd
|
||||
syslog(LOG_INFO, "Opening socket to xcatd...");
|
||||
|
@ -137,7 +137,7 @@ sub process_request {
|
||||
my $doreq = shift;
|
||||
my $node = $request->{node}->[0];
|
||||
my $clientip = $request->{'_xcat_clientip'};
|
||||
openlog("xCAT node discovery",'','local0');
|
||||
openlog("xcat",'','local0');
|
||||
|
||||
|
||||
#First, fill in tables with data fields..
|
||||
|
@ -34,7 +34,7 @@ if ($tobedaemon) {
|
||||
}
|
||||
|
||||
# open syslog
|
||||
openlog("proxydhcp", "nofatal", "local4");
|
||||
openlog("xcat", "nofatal", "local4");
|
||||
|
||||
my $socket;
|
||||
my $retry = 5;
|
||||
|
@ -306,7 +306,7 @@ if ($LOG || (keys(%hashL)==0)) {
|
||||
if ($briefmsg) { $body=$briefmsg;}
|
||||
else { $body=$message; }
|
||||
|
||||
openlog("xCATMon Event","","local4");
|
||||
openlog("xcat","","local4");
|
||||
if ($severity_type eq "Informational") {
|
||||
syslog("local4|info", "$head\n$body\n");
|
||||
} else {
|
||||
|
@ -110,7 +110,7 @@ use xCAT::ExtTab;
|
||||
use Data::Dumper;
|
||||
use Getopt::Long;
|
||||
use Sys::Syslog qw(:DEFAULT setlogsock);
|
||||
openlog("xcatd",,"local4");
|
||||
openlog("xcat",,"local4");
|
||||
# turn off warnings for call to setlogsock. puts out warning message if
|
||||
# syslog tcp port not defined in /etc/services. this can safely be ignored.
|
||||
no warnings;
|
||||
@ -671,7 +671,7 @@ sub do_udp_service { #This function opens up a UDP port
|
||||
sleep 0.05;
|
||||
}
|
||||
|
||||
openlog("xCAT UDP",'','local4');
|
||||
openlog("xcat",'','local4');
|
||||
unless ($socket) {
|
||||
xCAT::MsgUtils->message("S","xCAT UDP service unable to open port $port: $!");
|
||||
closelog();
|
||||
@ -1050,7 +1050,7 @@ $chrselect->add($chreadpipe);
|
||||
my $peername;
|
||||
my $ssltimeout;
|
||||
my $retry=1;
|
||||
openlog("xCAT SSL","","local4");
|
||||
openlog("xcat","","local4");
|
||||
my $listener;
|
||||
my $mainpidfile;
|
||||
$SIG{USR2} = sub {
|
||||
|
@ -124,7 +124,7 @@ sub logger {
|
||||
my $msg = shift;
|
||||
|
||||
setlogsock('unix');
|
||||
openlog('autogpfsc','','local0');
|
||||
openlog('xcat','','local0');
|
||||
syslog($type,$msg);
|
||||
closelog();
|
||||
}
|
||||
|
@ -369,7 +369,7 @@ sub logger {
|
||||
my $msg = shift;
|
||||
|
||||
setlogsock('unix');
|
||||
openlog('autogpfsd','','local0');
|
||||
openlog('xcat','','local0');
|
||||
syslog($type,$msg);
|
||||
closelog();
|
||||
|
||||
|
@ -116,13 +116,11 @@ fi
|
||||
|
||||
if [ ! -f $gmond_conf ]; then
|
||||
# echo "file not found"
|
||||
logger -t gmonfail "gmond configuration file not found"
|
||||
logger -t xcat -p local4.warning "gmond configuration file not found"
|
||||
fi
|
||||
|
||||
if [ ! -f $gmond_conf_old ]; then
|
||||
# echo "file not found"
|
||||
logger -t gmonfail "gmond configuration file not found"
|
||||
logger -t xcat -p local4.warning "gmond configuration file not found"
|
||||
fi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user