haystack/rest_api/rest_api/__about__.py
ZanSara 13c4ff1b52
refactor: remove direct logging without a logger (#4253)
* remove direct logging without a logger

* add custom pylint checker

* add test

* pylint

* improve checker message

* mypy

* remove test

* add checker for basicConfig

* more logging missed

* ignore basicConfig

* move out logger

* move out statement

* remove logging configuration
2023-02-23 20:42:42 +01:00

14 lines
263 B
Python

import logging
from pathlib import Path
__version__ = "0.0.0"
try:
__version__ = open(Path(__file__).parent.parent / "VERSION.txt", "r").read()
except Exception as e:
logger = logging.getLogger(__name__)
logger.exception("No VERSION.txt found!")