mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-10 16:43:35 +02:00
2019-06-17 Fred Gleason <fredg@paravelsystems.com>
* Refactored logging system to use syslog(3) exclusively. * Removed the 'Facility=', 'LogDirectory=', 'CoreDumpDirectory=' and 'LogPattern=' directives from rd.conf(5).
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
//
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <syslog.h>
|
||||
|
||||
#include <rd.h>
|
||||
#include <rdapplication.h>
|
||||
@@ -87,7 +88,7 @@ void MainObject::RunSystemMaintRoutine()
|
||||
RunEphemeralProcess(RDSERVICE_PURGECASTS_ID,
|
||||
QString(RD_PREFIX)+"/bin/rdpurgecasts",args);
|
||||
|
||||
rda->log(RDConfig::LogInfo,"ran system-wide maintenance routines");
|
||||
syslog(LOG_INFO,"ran system-wide maintenance routines");
|
||||
}
|
||||
|
||||
|
||||
@@ -96,7 +97,7 @@ void MainObject::RunLocalMaintRoutine()
|
||||
RunEphemeralProcess(RDSERVICE_LOCALMAINT_ID,
|
||||
QString(RD_PREFIX)+"/bin/rdmaint",QStringList());
|
||||
|
||||
rda->log(RDConfig::LogInfo,"ran local maintenance routines");
|
||||
syslog(LOG_INFO,"ran local maintenance routines");
|
||||
}
|
||||
|
||||
|
||||
@@ -118,7 +119,7 @@ void MainObject::RunEphemeralProcess(int id,const QString &program,
|
||||
if(!svc_processes[id]->process()->waitForStarted()) {
|
||||
QString err_msg=tr("unable to start")+"\""+program+"\": "+
|
||||
svc_processes[id]->errorText();
|
||||
rda->log(RDConfig::LogWarning,err_msg);
|
||||
syslog(LOG_WARNING,"%s",(const char *)err_msg.toUtf8());
|
||||
delete svc_processes[id];
|
||||
svc_processes.remove(id);
|
||||
}
|
||||
|
@@ -21,6 +21,7 @@
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <syslog.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
@@ -128,7 +129,7 @@ MainObject::MainObject(QObject *parent)
|
||||
svc_maint_timer->start(interval);
|
||||
}
|
||||
else {
|
||||
rda->log(RDConfig::LogInfo,"maintenance checks disabled on this host!");
|
||||
syslog(LOG_INFO,"maintenance checks disabled on this host");
|
||||
}
|
||||
|
||||
if(!RDWritePid(RD_PID_DIR,"rdservice.pid",getuid())) {
|
||||
|
@@ -19,6 +19,7 @@
|
||||
//
|
||||
|
||||
#include <stdio.h>
|
||||
#include <syslog.h>
|
||||
|
||||
#include <qstringlist.h>
|
||||
#include <qfileinfo.h>
|
||||
|
Reference in New Issue
Block a user