diff --git a/frigate/__main__.py b/frigate/__main__.py index 9e8124b5b..ea888a948 100644 --- a/frigate/__main__.py +++ b/frigate/__main__.py @@ -10,6 +10,7 @@ from pydantic import ValidationError from frigate.app import FrigateApp from frigate.config import FrigateConfig +from frigate.log import log_thread def main() -> None: @@ -28,6 +29,11 @@ def main() -> None: # Make sure we exit cleanly on SIGTERM. signal.signal(signal.SIGTERM, lambda sig, frame: sys.exit()) + run() + + +@log_thread() +def run() -> None: # Parse the cli arguments. parser = argparse.ArgumentParser( prog="Frigate", diff --git a/frigate/app.py b/frigate/app.py index 0d15a7362..0e6a373a4 100644 --- a/frigate/app.py +++ b/frigate/app.py @@ -37,7 +37,6 @@ from frigate.events.audio import listen_to_audio from frigate.events.cleanup import EventCleanup from frigate.events.external import ExternalEventProcessor from frigate.events.maintainer import EventProcessor -from frigate.log import log_thread from frigate.models import ( Event, Export, @@ -632,7 +631,6 @@ class FrigateApp: logger.info("********************************************************") logger.info("********************************************************") - @log_thread() def start(self) -> None: logger.info(f"Starting Frigate ({VERSION})")