Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0597a9d7 authored by Zhuoyao Zhang's avatar Zhuoyao Zhang
Browse files

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
parent 8a225796
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -63,6 +63,9 @@ def configure_logging():
  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}')