Filter does not act as expected
See original GitHub issuere: https://github.com/jpmens/mqttwarn/wiki/Filtering
I have a simple filter defined in the [defaults] section of mqttwarn.ini
def logging_filter(topic, message):
return True
The goal: prove filtering works by denying all messages.
Later in the file, we have:
[logging/hare]
targets = pushover:pam, log:crit, file:mylog
title: SSH login on {hostname}
filter = logging_filter()
format = User {user} logged into {hostname} from {rhost} at {_dthhmmss}
The function should suppress all incoming logging/hare messages.
No logging/hare messages are being suppressed.
EDIT: Change return value to True
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Why does the filter() function not return my expected type ...
I think I have a misconception with Typescript. As I understand, after the filter function there will be no undefined in the array....
Read more >Top N Filter Not Acting as Expected. - Tableau Community
I have tables with 7-10 filters and millions of rows of data, so it's not at all practical to add the filters into...
Read more >Filter function in Calculate not giving the expected result
Solved: Hi Experts , Filter function in Calculate not giving the expected result. Trying to get the sum of max timekey in each...
Read more >Task Report with Table Filter does not function as expected
A) When all filters are cleared except for a single selection for Task Appears On, the list of tasks does not include all...
Read more >Initialize Butterworth Filter - Does not perform as expected?
I am filtering some data using the Point-by-Point Butterworth filter. Every so often I change the input stream to a different sensor.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
SUCCESS.
I will fix the docs.
Ah - I missed the fact you have this in your INI file. Functions need to live in a separate
functions.py
file, which is defined in your INI file. See https://github.com/jpmens/mqttwarn#the-defaults-section.