瀏覽代碼

simplify logs

Khaleel Al-Adhami 1 周之前
父節點
當前提交
309444bca2
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      reflex/app.py

+ 7 - 0
reflex/app.py

@@ -663,6 +663,13 @@ class App(MiddlewareMixin, LifespanMixin):
                 self.app = app
 
             async def __call__(self, scope: Scope, receive: Receive, send: Send):
+                if scope["type"] != "http":
+                    return await self.app(scope, receive, send)
+
+                print(  # noqa: T201
+                    f"Called scope: {scope}"
+                )
+
                 async def log_receive():
                     message = await receive()
                     print(  # noqa: T201