Filter out the logs from inotify_buffer in edit monitor

The inotify_buffer logs every filesystem event received (in Debug level) which
pollutes the edit monitor log. This cl filters out the logs from
inotify_buffer.py to keep the log clean.

Test: make edit_monitor and test it locally
Bug: 365617369
Change-Id: Ib7951c2fd7d8cabf3f56a2cd0364c26f682ca977
diff --git a/tools/edit_monitor/main.py b/tools/edit_monitor/main.py
index 40574ad..9086ac8 100644
--- a/tools/edit_monitor/main.py
+++ b/tools/edit_monitor/main.py
@@ -63,6 +63,9 @@
   logging.basicConfig(
       filename=log_path, level=logging.DEBUG, format=log_fmt, datefmt=date_fmt
   )
+  # Filter out logs from inotify_buff to prevent log pollution.
+  logging.getLogger('watchdog.observers.inotify_buffer').addFilter(
+      lambda record: record.filename != 'inotify_buffer.py')
   print(f'logging to file {log_path}')