Ensure logging is setup during config parsing

This commit is contained in:
George Tsiamasiotis 2024-09-23 11:16:14 +03:00
parent 13e6e36812
commit 7159d6af60
2 changed files with 6 additions and 2 deletions

View File

@ -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",

View File

@ -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})")