Skip to content

Log filtered command name - #1631

Merged
sijis merged 4 commits into
errbotio:masterfrom
jcfrt:fix_cmdfilter_log
May 1, 2026
Merged

sijis merged 4 commits into
errbotio:masterfrom
jcfrt:fix_cmdfilter_log

Conversation

@jcfrt

@jcfrt jcfrt commented Feb 10, 2023 •

Copy link
Copy Markdown
Contributor

If a command is blocked by a cmdfilter, the name of the command should be logged instead of being logged as "None".

@sijis sijis closed this Jun 10, 2023
@sijis sijis reopened this Jun 10, 2023
jcfrt and others added 4 commits April 30, 2026 21:06
If a command is blocked by a cmdfilter, the name of the command should
be logged instead of logged as "None".
Returning cmd and args is not used by anything but for logging purposes.
@sijis
sijis force-pushed the fix_cmdfilter_log branch from cb9d0ae to bca954a Compare May 1, 2026 02:26
@sijis

sijis commented May 1, 2026

Copy link
Copy Markdown
Contributor

@jcfrt Thank you!

@sijis

sijis commented May 1, 2026

Copy link
Copy Markdown
Contributor

As an example, this is what the before and after look like

## Before
  INFO:errbot.core:Command None blocked or deferred.
    returned tuple: (None, None, None)

## After
  INFO:errbot.core:Command "restart" blocked or deferred.
    returned tuple: (None, 'restart', ('--force',))

@sijis
sijis merged commit 5632dbe into errbotio:master May 1, 2026
5 checks passed
sijis added a commit to sijis/errbot that referenced this pull request Jun 6, 2026
* Log filtered command name

If a command is blocked by a cmdfilter, the name of the command should
be logged instead of logged as "None".

* Update cmdfilter docstring

Returning cmd and args is not used by anything but for logging purposes.

* test: add tests to validate logging of cmdfilter

* docs: add info to CHANGES

---------

Co-authored-by: Sijis Aviles <sijis.aviles@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants