Add exercises from sw5 theory lesson
This commit is contained in:
1 parent
4f1450fe6e
commit
ecf4a2ed7a
2 files changed
+39
No files matched your search
@@ -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")
|
||||
Reference in new issue
Block a user