mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-05-19 14:43:30 +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:
parent
ed968656c6
commit
f1d2c02862
@ -23818,3 +23818,6 @@
|
|||||||
2022-12-14 Fred Gleason <fredg@paravelsystems.com>
|
2022-12-14 Fred Gleason <fredg@paravelsystems.com>
|
||||||
* Fixed a regression in rdlogedit(1) that broke the 'Estimated' start
|
* Fixed a regression in rdlogedit(1) that broke the 'Estimated' start
|
||||||
time mode.
|
time mode.
|
||||||
|
2022-12-16 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Added a 'LogSqlQueries=' directive to the '[Debugging]'
|
||||||
|
section of rd.conf(5).
|
||||||
|
@ -226,3 +226,10 @@ LogSearchStrings=
|
|||||||
; priority levels. An empty argument disables logging.
|
; priority levels. An empty argument disables logging.
|
||||||
; LogLogRefresh=LOG_DEBUG
|
; LogLogRefresh=LOG_DEBUG
|
||||||
LogLogRefresh=
|
LogLogRefresh=
|
||||||
|
|
||||||
|
; Send all SQL queries (including 'select' queries) to the syslog at the
|
||||||
|
; specified priority level.
|
||||||
|
; See the 'level' parameter in the syslog(3) man page for the set of available
|
||||||
|
; priority levels. An empty argument disables logging.
|
||||||
|
; LogSqlQueries=LOG_DEBUG
|
||||||
|
LogSqlQueries=
|
||||||
|
@ -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
|
int RDConfig::meterBasePort() const
|
||||||
{
|
{
|
||||||
return conf_meter_base_port;
|
return conf_meter_base_port;
|
||||||
@ -655,6 +667,9 @@ bool RDConfig::load()
|
|||||||
conf_log_log_refresh_level=
|
conf_log_log_refresh_level=
|
||||||
SyslogPriorityLevel(profile->stringValue("Debugging","LogLogRefresh",""),
|
SyslogPriorityLevel(profile->stringValue("Debugging","LogLogRefresh",""),
|
||||||
&conf_log_log_refresh);
|
&conf_log_log_refresh);
|
||||||
|
conf_log_sql_queries_level=
|
||||||
|
SyslogPriorityLevel(profile->stringValue("Debugging","LogSqlQueries",""),
|
||||||
|
&conf_log_sql_queries);
|
||||||
conf_meter_base_port=
|
conf_meter_base_port=
|
||||||
profile->intValue("Hacks","MeterPortBaseNumber",RD_DEFAULT_METER_SOCKET_BASE_UDP_PORT);
|
profile->intValue("Hacks","MeterPortBaseNumber",RD_DEFAULT_METER_SOCKET_BASE_UDP_PORT);
|
||||||
conf_meter_port_range=
|
conf_meter_port_range=
|
||||||
@ -788,6 +803,8 @@ void RDConfig::clear()
|
|||||||
conf_log_search_strings_level=LOG_DEBUG;
|
conf_log_search_strings_level=LOG_DEBUG;
|
||||||
conf_log_log_refresh=false;
|
conf_log_log_refresh=false;
|
||||||
conf_log_log_refresh_level=LOG_DEBUG;
|
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_lock_rdairplay_memory=false;
|
||||||
conf_meter_base_port=RD_DEFAULT_METER_SOCKET_BASE_UDP_PORT;
|
conf_meter_base_port=RD_DEFAULT_METER_SOCKET_BASE_UDP_PORT;
|
||||||
conf_meter_port_range=RD_METER_SOCKET_PORT_RANGE;
|
conf_meter_port_range=RD_METER_SOCKET_PORT_RANGE;
|
||||||
|
@ -109,6 +109,8 @@ class RDConfig
|
|||||||
int logSearchStringsLevel() const;
|
int logSearchStringsLevel() const;
|
||||||
bool logLogRefresh() const;
|
bool logLogRefresh() const;
|
||||||
int logLogRefreshLevel() const;
|
int logLogRefreshLevel() const;
|
||||||
|
bool logSqlQueries() const;
|
||||||
|
int logSqlQueriesLevel() const;
|
||||||
bool enableMixerLogging() const;
|
bool enableMixerLogging() const;
|
||||||
uid_t uid() const;
|
uid_t uid() const;
|
||||||
gid_t gid() const;
|
gid_t gid() const;
|
||||||
@ -186,6 +188,8 @@ class RDConfig
|
|||||||
int conf_log_search_strings_level;
|
int conf_log_search_strings_level;
|
||||||
bool conf_log_log_refresh;
|
bool conf_log_log_refresh;
|
||||||
int conf_log_log_refresh_level;
|
int conf_log_log_refresh_level;
|
||||||
|
bool conf_log_sql_queries;
|
||||||
|
int conf_log_sql_queries_level;
|
||||||
bool conf_lock_rdairplay_memory;
|
bool conf_lock_rdairplay_memory;
|
||||||
QString conf_save_webget_files_directory;
|
QString conf_save_webget_files_directory;
|
||||||
bool conf_suppress_rdcatch_meter_updates;
|
bool conf_suppress_rdcatch_meter_updates;
|
||||||
|
@ -65,6 +65,10 @@ RDSqlQuery::RDSqlQuery (const QString &query,bool reconnect):
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(isActive()) {
|
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());
|
//printf("QUERY: %s\n",(const char *)query.toUtf8());
|
||||||
QStringList f0=query.split(" ");
|
QStringList f0=query.split(" ");
|
||||||
if(f0[0].toLower()=="select") {
|
if(f0[0].toLower()=="select") {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user