mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-16 15:41:13 +02:00
2022-12-16 Fred Gleason <fredg@paravelsystems.com>
* Added a 'LogSqlQueries=' directive to the '[Debugging]' section of rd.conf(5). Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -423,6 +423,18 @@ int RDConfig::logLogRefreshLevel() const
|
||||
}
|
||||
|
||||
|
||||
bool RDConfig::logSqlQueries() const
|
||||
{
|
||||
return conf_log_sql_queries;
|
||||
}
|
||||
|
||||
|
||||
int RDConfig::logSqlQueriesLevel() const
|
||||
{
|
||||
return conf_log_sql_queries_level;
|
||||
}
|
||||
|
||||
|
||||
int RDConfig::meterBasePort() const
|
||||
{
|
||||
return conf_meter_base_port;
|
||||
@@ -655,6 +667,9 @@ bool RDConfig::load()
|
||||
conf_log_log_refresh_level=
|
||||
SyslogPriorityLevel(profile->stringValue("Debugging","LogLogRefresh",""),
|
||||
&conf_log_log_refresh);
|
||||
conf_log_sql_queries_level=
|
||||
SyslogPriorityLevel(profile->stringValue("Debugging","LogSqlQueries",""),
|
||||
&conf_log_sql_queries);
|
||||
conf_meter_base_port=
|
||||
profile->intValue("Hacks","MeterPortBaseNumber",RD_DEFAULT_METER_SOCKET_BASE_UDP_PORT);
|
||||
conf_meter_port_range=
|
||||
@@ -788,6 +803,8 @@ void RDConfig::clear()
|
||||
conf_log_search_strings_level=LOG_DEBUG;
|
||||
conf_log_log_refresh=false;
|
||||
conf_log_log_refresh_level=LOG_DEBUG;
|
||||
conf_log_sql_queries=false;
|
||||
conf_log_sql_queries_level=LOG_DEBUG;
|
||||
conf_lock_rdairplay_memory=false;
|
||||
conf_meter_base_port=RD_DEFAULT_METER_SOCKET_BASE_UDP_PORT;
|
||||
conf_meter_port_range=RD_METER_SOCKET_PORT_RANGE;
|
||||
|
@@ -109,6 +109,8 @@ class RDConfig
|
||||
int logSearchStringsLevel() const;
|
||||
bool logLogRefresh() const;
|
||||
int logLogRefreshLevel() const;
|
||||
bool logSqlQueries() const;
|
||||
int logSqlQueriesLevel() const;
|
||||
bool enableMixerLogging() const;
|
||||
uid_t uid() const;
|
||||
gid_t gid() const;
|
||||
@@ -186,6 +188,8 @@ class RDConfig
|
||||
int conf_log_search_strings_level;
|
||||
bool conf_log_log_refresh;
|
||||
int conf_log_log_refresh_level;
|
||||
bool conf_log_sql_queries;
|
||||
int conf_log_sql_queries_level;
|
||||
bool conf_lock_rdairplay_memory;
|
||||
QString conf_save_webget_files_directory;
|
||||
bool conf_suppress_rdcatch_meter_updates;
|
||||
|
@@ -65,6 +65,10 @@ RDSqlQuery::RDSqlQuery (const QString &query,bool reconnect):
|
||||
}
|
||||
|
||||
if(isActive()) {
|
||||
if((rda!=NULL)&&(rda->config()->logSqlQueries())) {
|
||||
rda->syslog(rda->config()->logSqlQueriesLevel(),
|
||||
"SQL: %s",query.toUtf8().constData());
|
||||
}
|
||||
//printf("QUERY: %s\n",(const char *)query.toUtf8());
|
||||
QStringList f0=query.split(" ");
|
||||
if(f0[0].toLower()=="select") {
|
||||
|
Reference in New Issue
Block a user