Spaces:
Runtime error
Runtime error
Download src/utils/logger.py from samithcs/chainlit-supplychain-app: direct link, hf CLI and curl.
- Browser
- Download file 306 Bytes
-
https://huggingface.co/spaces/samithcs/chainlit-supplychain-app/resolve/main/src/utils/logger.py
- Command line
-
hf download hf://spaces/samithcs/chainlit-supplychain-app/src/utils/logger.py
-
curl -L -o logger.py https://huggingface.co/spaces/samithcs/chainlit-supplychain-app/resolve/main/src/utils/logger.py
306 Bytes
| import logging | |
| import os | |
| os.makedirs('artifacts/logs', exist_ok=True) | |
| logging.basicConfig( | |
| level=logging.INFO, | |
| format='%(asctime)s - %(levelname)s - %(message)s', | |
| handlers=[ | |
| logging.FileHandler(os.path.join('artifacts', 'logs', 'logfile.txt')), | |
| logging.StreamHandler() | |
| ] | |
| ) |