Closed acriptis closed 4 years ago
You are probably right, it’s the wrong logging statement and probably best to move it to a debug or I do statement.
I’ll add it to the next point release
Regards
Keith 07771 597630
On 30 Sep 2019, at 12:32, Alexander Dmitrievskiy notifications@github.com wrote:
I have a pattern specified like this:
animal is an animal. And if I write "Yes" to my bot (or some other phrases) it writes into log the ERROR entry because it tries to match the text with pattern of the animal set:
2019-09-30 12:48:13,240 root ERROR [Console] [bot] [brain] [Console] - No word [Yes] found in set [ANIMAL] I found that this occurs in this line of code: https://github.com/keiffster/program-y/blob/master/src/programy/parser/pattern/nodes/set.py#L138
Is mismatch of token to the set is intentionally marked as ERROR or it better to reimplement as DEBUG? (I suppose it is ok that pattern has not matched). I expect that pattern mismatch in this case should be logged with DEBUG level. Now I grab a lot of ERRORS in logs like this:
2019-09-30 13:46:24,548 root ERROR [Console] [bot] [brain] [Console] - No word [YEXITRESPONSE] found in set [ANIMALS] 2019-09-30 13:46:24,548 root ERROR [Console] [bot] [brain] [Console] - No word [YEXITRESPONSE] found in set [ANIMAL] 2019-09-30 13:46:24,548 root ERROR [Console] [bot] [brain] [Console] - No word [YEXITRESPONSE] found in set [BIRD] 2019-09-30 13:46:24,548 root ERROR [Console] [bot] [brain] [Console] - No word [YEXITRESPONSE] found in set [NUMBERNAME] 2019-09-30 13:46:24,548 root ERROR [Console] [bot] [brain] [Console] - No word [YEXITRESPONSE] found in set [NAME] 2019-09-30 13:46:24,548 root ERROR [Console] [bot] [brain] [Console] - No word [YEXITRESPONSE] found in set [ARTICLE] 2019-09-30 13:46:24,548 root ERROR [Console] [bot] [brain] [Console] - No word [YEXITRESPONSE] found in set [LANGUAGE] — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
Ok, thanks!
I have a pattern specified like this:
And if I write "Yes" to my bot (or some other phrases) it writes into log the ERROR entry because it tries to match the text with pattern of the animal set:
I found that this occurs in this line of code: https://github.com/keiffster/program-y/blob/master/src/programy/parser/pattern/nodes/set.py#L138
Is mismatch of token to the set is intentionally marked as ERROR or it better to reimplement as DEBUG? (I suppose it is ok that pattern has not matched). I expect that pattern mismatch in this case should be logged with DEBUG level. Now I grab a lot of ERRORS in logs like this: