Changeset 223c9d5 in flexoentity
- Timestamp:
- 11/05/25 07:23:42 (2 months ago)
- Branches:
- master
- Children:
- 269fdc2
- Parents:
- 73d392f
- Location:
- flexoentity
- Files:
-
- 1 added
- 1 edited
-
__init__.py (modified) (2 diffs)
-
logger.py (added)
Legend:
- Unmodified
- Added
- Removed
-
flexoentity/__init__.py
r73d392f r223c9d5 9 9 # configuration created this dir with the appropriate rights 10 10 11 import logging12 import logging.config13 import os14 from pathlib import Path15 11 from importlib.metadata import version, PackageNotFoundError 16 17 log_dir = Path(os.environ.get('FLEXO_LOG_DIR', '/tmp/')) 18 19 log_path = log_dir / 'flexo.log' 20 21 if not log_path.exists(): 22 try: 23 log_path.touch() 24 except PermissionError: 25 conf_file = Path(__file__).parent / 'flexo_logging.conf' 26 print("Conf file", conf_file) 27 logging.config.fileConfig(conf_file) 28 else: 29 logging.basicConfig(filename=str(log_path), encoding='utf-8', level=logging.DEBUG) 30 31 logger = logging.getLogger(__name__) 32 33 logger.setLevel(os.environ.get('FLEXO_LOG_LEVEL', logger.getEffectiveLevel())) 34 12 from .logger import logger 35 13 from .id_factory import FlexOID, canonical_seed 36 14 from .flexo_entity import FlexoEntity, EntityType, EntityState … … 44 22 "Domain", 45 23 "EntityState", 24 "logger" 46 25 ] 47 26
Note:
See TracChangeset
for help on using the changeset viewer.
