Spaces:
Build error
Build error
Download src/logger.py from SURESHBEEKHANI/Heart_Attack_Prediction: direct link, hf CLI and curl.
- Browser
- Download file 425 Bytes
-
https://huggingface.co/spaces/SURESHBEEKHANI/Heart_Attack_Prediction/resolve/main/src/logger.py
- Command line
-
hf download hf://spaces/SURESHBEEKHANI/Heart_Attack_Prediction/src/logger.py
-
curl -L -o logger.py https://huggingface.co/spaces/SURESHBEEKHANI/Heart_Attack_Prediction/resolve/main/src/logger.py
425 Bytes
| import logging | |
| import os | |
| from datetime import datetime | |
| LOG_FILE=f"{datetime.now().strftime('%m_%d_%Y_%H_%M_%S')}.log" | |
| logs_path=os.path.join(os.getcwd(),"logs",LOG_FILE) | |
| os.makedirs(logs_path,exist_ok=True) | |
| LOG_FILE_PATH=os.path.join(logs_path,LOG_FILE) | |
| logging.basicConfig( | |
| filename=LOG_FILE_PATH, | |
| format="[ %(asctime)s ] %(lineno)d %(name)s - %(levelname)s - %(message)s", | |
| level=logging.INFO | |
| ) |