mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-16 07:31:19 +02:00
2022-12-07 Fred Gleason <fredg@paravelsystems.com>
* Added a 'LogLogRefresh=' directive to the '[Debugging]' section of rd.conf(5). Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -23770,3 +23770,6 @@
|
||||
2022-12-07 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Extended the 'LogSearchStrings=' directive in rd.conf(5) to
|
||||
include searches for podcast items.
|
||||
2022-12-07 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added a 'LogLogRefresh=' directive to the '[Debugging]'
|
||||
section of rd.conf(5).
|
||||
|
@@ -209,9 +209,20 @@ TranscodingDelay=0
|
||||
;SuppressRdcatchMeterUpdates=No
|
||||
|
||||
[Debugging]
|
||||
; IMPORTANT NOTE:
|
||||
; The directives in this section can send large amounts of data to the
|
||||
; syslog. These directives should be enabled for debugging purposes only!
|
||||
|
||||
; Log all filter search strings 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.
|
||||
;
|
||||
; LogSearchStrings=LOG_DEBUG
|
||||
LogSearchStrings=
|
||||
|
||||
; Send detailed debugging information to the syslog whenever a log refresh
|
||||
; is performed in rdairplay(1) or rdvairplayd(8).
|
||||
; See the 'level' parameter in the syslog(3) man page for the set of available
|
||||
; priority levels. An empty argument disables logging.
|
||||
; LogLogRefresh=LOG_DEBUG
|
||||
LogLogRefresh=
|
@@ -411,6 +411,18 @@ int RDConfig::logSearchStringsLevel() const
|
||||
}
|
||||
|
||||
|
||||
bool RDConfig::logLogRefresh() const
|
||||
{
|
||||
return conf_log_log_refresh;
|
||||
}
|
||||
|
||||
|
||||
int RDConfig::logLogRefreshLevel() const
|
||||
{
|
||||
return conf_log_log_refresh_level;
|
||||
}
|
||||
|
||||
|
||||
int RDConfig::meterBasePort() const
|
||||
{
|
||||
return conf_meter_base_port;
|
||||
@@ -640,6 +652,9 @@ bool RDConfig::load()
|
||||
conf_log_search_strings_level=
|
||||
SyslogPriorityLevel(profile->stringValue("Debugging","LogSearchStrings",""),
|
||||
&conf_log_search_strings);
|
||||
conf_log_log_refresh_level=
|
||||
SyslogPriorityLevel(profile->stringValue("Debugging","LogLogRefresh",""),
|
||||
&conf_log_log_refresh);
|
||||
conf_meter_base_port=
|
||||
profile->intValue("Hacks","MeterPortBaseNumber",RD_DEFAULT_METER_SOCKET_BASE_UDP_PORT);
|
||||
conf_meter_port_range=
|
||||
@@ -771,6 +786,8 @@ void RDConfig::clear()
|
||||
conf_suppress_rdcatch_meter_updates=false;
|
||||
conf_log_search_strings=false;
|
||||
conf_log_search_strings_level=LOG_DEBUG;
|
||||
conf_log_log_refresh=false;
|
||||
conf_log_log_refresh_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;
|
||||
|
@@ -107,6 +107,8 @@ class RDConfig
|
||||
bool suppressRdcatchMeterUpdates() const;
|
||||
bool logSearchStrings() const;
|
||||
int logSearchStringsLevel() const;
|
||||
bool logLogRefresh() const;
|
||||
int logLogRefreshLevel() const;
|
||||
bool enableMixerLogging() const;
|
||||
uid_t uid() const;
|
||||
gid_t gid() const;
|
||||
@@ -182,6 +184,8 @@ class RDConfig
|
||||
bool conf_disable_maint_checks;
|
||||
bool conf_log_search_strings;
|
||||
int conf_log_search_strings_level;
|
||||
bool conf_log_log_refresh;
|
||||
int conf_log_log_refresh_level;
|
||||
bool conf_lock_rdairplay_memory;
|
||||
QString conf_save_webget_files_directory;
|
||||
bool conf_suppress_rdcatch_meter_updates;
|
||||
|
@@ -623,6 +623,11 @@ bool RDLogPlay::refresh()
|
||||
int running;
|
||||
int first_non_holdover = 0;
|
||||
|
||||
if(rda->config()->logLogRefresh()) {
|
||||
rda->syslog(rda->config()->logLogRefreshLevel(),"log refresh begins...");
|
||||
DumpToSyslog(rda->config()->logLogRefreshLevel(),"before refresh:");
|
||||
}
|
||||
|
||||
if(play_macro_running) {
|
||||
play_refresh_pending=true;
|
||||
return true;
|
||||
@@ -768,6 +773,11 @@ bool RDLogPlay::refresh()
|
||||
|
||||
emit refreshStatusChanged(false);
|
||||
|
||||
if(rda->config()->logLogRefresh()) {
|
||||
DumpToSyslog(rda->config()->logLogRefreshLevel(),"after refresh:");
|
||||
rda->syslog(rda->config()->logLogRefreshLevel(),"...log refresh ends");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -3385,3 +3395,43 @@ void RDLogPlay::LogTraffic(RDLogLine *logline,RDLogLine::PlaySource src,
|
||||
"`ISCI`='"+RDEscapeString(logline->isci())+"'";
|
||||
RDSqlQuery::apply(sql);
|
||||
}
|
||||
|
||||
|
||||
void RDLogPlay::DumpToSyslog(int prio_lvl,const QString &hdr) const
|
||||
{
|
||||
QString str;
|
||||
|
||||
for(int i=0;i<lineCount();i++) {
|
||||
RDLogLine *ll=logLine(i);
|
||||
str+=QString::asprintf("count: %d: ",i);
|
||||
str+="type: "+RDLogLine::typeText(ll->type())+" ";
|
||||
switch(ll->type()) {
|
||||
case RDLogLine::Cart:
|
||||
case RDLogLine::Macro:
|
||||
str+=QString::asprintf("cartnum: %06u ",ll->cartNumber());
|
||||
str+="title: "+ll->title()+" ";
|
||||
break;
|
||||
|
||||
case RDLogLine::Marker:
|
||||
case RDLogLine::Track:
|
||||
case RDLogLine::Chain:
|
||||
str+="comment: "+ll->markerComment()+" ";
|
||||
break;
|
||||
|
||||
case RDLogLine::MusicLink:
|
||||
case RDLogLine::TrafficLink:
|
||||
str+="event: "+ll->linkEventName()+" ";
|
||||
str+="start time: "+ll->linkStartTime().toString("hh:mm:ss")+" ";
|
||||
str+="length: "+RDGetTimeLength(ll->linkLength(),false,false)+" ";
|
||||
break;
|
||||
|
||||
case RDLogLine::OpenBracket:
|
||||
case RDLogLine::CloseBracket:
|
||||
case RDLogLine::UnknownType:
|
||||
break;
|
||||
}
|
||||
str+="\n";
|
||||
}
|
||||
rda->syslog(prio_lvl,"%s\n%s",hdr.toUtf8().constData(),
|
||||
str.toUtf8().constData());
|
||||
}
|
||||
|
@@ -203,6 +203,7 @@ class RDLogPlay : public RDLogModel
|
||||
bool final=false) const;
|
||||
void LogTraffic(RDLogLine *logline,RDLogLine::PlaySource src,
|
||||
RDAirPlayConf::TrafficAction action,bool onair_flag) const;
|
||||
void DumpToSyslog(int prio_lvl,const QString &hdr) const;
|
||||
RDCae *play_cae;
|
||||
RDAirPlayConf::OpMode play_op_mode;
|
||||
int play_slot_id[LOGPLAY_MAX_PLAYS];
|
||||
|
Reference in New Issue
Block a user