2019-08-20 Fred Gleason <fredg@paravelsystems.com>

* Added a 'DROPBOXES.LOG_TO_SYSLOG' field to the database.
	* Incremented the database version to 309.
	* Added a 'Log Events in Syslog' checkbox to the
	'Dropbox Configuration' dialog in rdadmin(1).
	* Added special name logic to RDApplication to detect when a
	dropbox is being started.
	* Modified the '--log-filename=' switch in rdimport(1) to accept
	both directory and filename components.
	* Removed the '--log-directory=' switch from rdimport(1).
	* Added an 'ID' column to the list of dropbox configurations in the
	'Rivendell Dropbox Configurations; dialog in rdadmin(1).
This commit is contained in:
Fred Gleason
2019-08-20 18:50:56 -04:00
parent 00a18ca23b
commit b9722a3be7
26 changed files with 526 additions and 429 deletions

View File

@@ -24,7 +24,7 @@
/*
* Current Database Version
*/
#define RD_VERSION_DATABASE 308
#define RD_VERSION_DATABASE 309
#endif // DBVERSION_H

View File

@@ -112,6 +112,8 @@ bool RDApplication::open(QString *err_msg,RDApplication::ErrorType *err_type,
int schema=0;
QString db_err;
bool skip_db_check=false;
int persistent_dropbox_id=-1;
bool ok=false;
if(err_type!=NULL) {
*err_type=RDApplication::ErrorOk;
@@ -127,6 +129,13 @@ bool RDApplication::open(QString *err_msg,RDApplication::ErrorType *err_type,
skip_db_check=true;
app_cmd_switch->setProcessed(i,true);
}
if(app_cmd_switch->key(i)=="--persistent-dropbox-id") {
persistent_dropbox_id=app_cmd_switch->value(i).toUInt(&ok);
if(ok) {
app_command_name=QString().sprintf("dropbox[%u]",persistent_dropbox_id);
}
app_cmd_switch->setProcessed(i,true);
}
}
//

View File

@@ -300,6 +300,19 @@ void RDDropbox::setFixBrokenFormats(bool state) const
}
bool RDDropbox::logToSyslog() const
{
return RDBool(RDGetSqlValue("DROPBOXES","ID",box_id,"LOG_TO_SYSLOG").
toString());
}
void RDDropbox::setLogToSyslog(bool state) const
{
SetRow("LOG_TO_SYSLOG",state);
}
QString RDDropbox::logPath() const
{
return RDGetSqlValue("DROPBOXES","ID",box_id,"LOG_PATH").toString();

View File

@@ -64,6 +64,8 @@ class RDDropbox
void setEnddateOffset(int offset) const;
bool fixBrokenFormats() const;
void setFixBrokenFormats(bool state) const;
bool logToSyslog() const;
void setLogToSyslog(bool state) const;
QString logPath() const;
void setLogPath(const QString &path) const;
bool createDates() const;