diff --git a/changelog.rst b/changelog.rst index 4144f5fe4..2246cfb69 100644 --- a/changelog.rst +++ b/changelog.rst @@ -10,6 +10,7 @@ Changelog - Run ``black`` on the entire source code - [watchmedo] Exclude ``FileOpenedEvent`` events from ``AutoRestartTrick``, and ``ShellCommandTrick``, to restore watchdog < 2.3.0 behavior. A better solution should be found in the future. (`#949 `__) +- [watchmedo] Log ``FileOpenedEvent``, and ``FileClosedEvent``, events in ``LoggerTrick`` - Thanks to our beloved contributors: @BoboTiG 2.3.0 diff --git a/src/watchdog/tricks/__init__.py b/src/watchdog/tricks/__init__.py index f14820b2c..d5da1eda8 100644 --- a/src/watchdog/tricks/__init__.py +++ b/src/watchdog/tricks/__init__.py @@ -101,6 +101,14 @@ def on_created(self, event): def on_moved(self, event): pass + @echo_events + def on_closed(self, event): + pass + + @echo_events + def on_opened(self, event): + pass + class ShellCommandTrick(Trick):