Skip to content

Commit 3edecb9

Browse files
committed
refactor: always log locally if logging toggled
1 parent 28c4bea commit 3edecb9

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

src/main.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -220,16 +220,6 @@ def handler(event: dict, context) -> str: # pylint: disable=unused-argument, to
220220

221221
# Toggle local logging
222222
if show_log_locally:
223-
# This is a nightmare to test as it's really hard to get to.
224-
# At some point we should look to make a wrapper for logging
225-
# so it can be tested more easily.
226-
logging.basicConfig(
227-
filename="debug.log",
228-
filemode="w",
229-
format="%(asctime)s %(levelname)s %(message)s",
230-
)
231-
else:
232-
# Ensure INFO logs show in the terminal when not logging to a file
233223
logging.basicConfig(
234224
level=logging.INFO,
235225
format="%(asctime)s %(levelname)s %(message)s",

0 commit comments

Comments
 (0)