Add exercises from sw5 theory lesson

This commit is contained in:
schaermicha1 committed 2026-03-20 15:18:03 +01:00
1 parent 4f1450fe6e
commit ecf4a2ed7a
2 files changed
+39

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
import logging
from pathlib import Path
Path("data/logs").mkdir(parents=True, exist_ok=True)
Path("data/logs/app.log").open("a")
logging.basicConfig(
level=logging.ERROR,
filename="data/logs/app.log",
filemode="a",
format="%(asctime)s - %(levelname)s - %(name)s - %(message)s",
)
logging.debug("Application started")
logging.info("Application started")
logging.warning("Application started")
logging.error("Application started")
logging.critical("Application started")