diff --git a/ChangeLog b/ChangeLog index 568227b3..d0acc238 100644 --- a/ChangeLog +++ b/ChangeLog @@ -23764,3 +23764,6 @@ 2022-12-07 Fred Gleason * Added a 'LogSearchStrings=' directive to the '[Debugging]' section of rd.conf(5). +2022-12-07 Fred Gleason + * Extended the 'LogSearchStrings=' directive in rd.conf(5) to + include searches for logs. diff --git a/lib/rdlogfilter.cpp b/lib/rdlogfilter.cpp index 7e877b63..e1271fa5 100644 --- a/lib/rdlogfilter.cpp +++ b/lib/rdlogfilter.cpp @@ -193,12 +193,14 @@ void RDLogFilter::changeUser() void RDLogFilter::filterChangedData(const QString &str) { + LogSearchString(filter_filter_edit->text()); emit filterChanged(whereSql()); } void RDLogFilter::filterChangedData() { + LogSearchString(filter_filter_edit->text()); emit filterChanged(whereSql()); } @@ -212,6 +214,7 @@ void RDLogFilter::filterClearedData() void RDLogFilter::serviceChangedData(int n) { + LogSearchString(filter_filter_edit->text()); emit filterChanged(whereSql()); } @@ -229,3 +232,14 @@ void RDLogFilter::resizeEvent(QResizeEvent *e) filter_recent_check->setGeometry(275,27,15,15); filter_recent_label->setGeometry(295,25,200,20); } + + +void RDLogFilter::LogSearchString(const QString &str) +{ + if(rda->config()->logSearchStrings()) { + rda->syslog(rda->config()->logSearchStringsLevel(), + "searching log list by string: \"%s\" [%s]", + str.toUtf8().constData(), + RDConfig::hexify(str).toUtf8().constData()); + } +} diff --git a/lib/rdlogfilter.h b/lib/rdlogfilter.h index c68a6b15..572829d2 100644 --- a/lib/rdlogfilter.h +++ b/lib/rdlogfilter.h @@ -59,6 +59,7 @@ class RDLogFilter : public QWidget void resizeEvent(QResizeEvent *e); private: + void LogSearchString(const QString &str); FilterMode filter_filter_mode; QLabel *filter_service_label; QComboBox *filter_service_box;