Changeset e62187d in ammosreader
- Timestamp:
- 05/18/23 11:02:16 (2 years ago)
- Branches:
- AmmosSource, guix
- Children:
- 726729c
- Parents:
- f30c38c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ammosreader/__init__.py
rf30c38c re62187d 1 1 import logging 2 import os 3 from pathlib import Path 4 2 5 logger = logging.getLogger(__name__) 6 7 logging_dir = Path(os.environ.get('AMMOS_LOG_DIR')) 8 9 if not log_dir.exists(): 10 log_dir = Path('/var/log/') 11 log_path = log_dir / 'ammos.log' 12 13 if not log_path.exists(): 14 print(log_path, "does not exist") 15 print("Logging disabled") 16 logging.config.fileConfig('ammos_logging.conf') 17 else: 18 logging.basicConfig(filename=str(log_path))
Note:
See TracChangeset
for help on using the changeset viewer.