We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7bb18a6 commit 273db5bCopy full SHA for 273db5b
tests/__init__.py
@@ -1,5 +1,14 @@
1
import logging
2
+import os
3
4
-# Avoid displaying stack traces at the ERROR logging level.
5
-logging.basicConfig(level=logging.CRITICAL)
+format = "%(asctime)s %(levelname)s %(name)s %(message)s"
6
+
7
+if bool(os.environ.get("WEBSOCKETS_DEBUG")): # pragma: no cover
8
+ # Display every frame sent or received in debug mode.
9
+ level = logging.DEBUG
10
+else:
11
+ # Hide stack traces of exceptions.
12
+ level = logging.CRITICAL
13
14
+logging.basicConfig(format=format, level=level)
0 commit comments