2018-11-22 18:31:59 +00:00
|
|
|
import logging
|
2023-10-27 12:52:46 +00:00
|
|
|
import importlib.metadata
|
2018-11-22 18:31:59 +00:00
|
|
|
|
2019-06-18 16:48:39 +00:00
|
|
|
__author__ = "Stefan Reimer"
|
|
|
|
__email__ = "stefan@zero-downtimet.net"
|
2022-02-08 15:01:41 +00:00
|
|
|
|
|
|
|
try:
|
2023-10-27 12:52:46 +00:00
|
|
|
__version__ = importlib.metadata.distribution("CloudBender").version
|
|
|
|
except importlib.metadata.PackageNotFoundError:
|
2022-02-08 15:01:41 +00:00
|
|
|
__version__ = "devel"
|
2018-11-22 18:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
# Set up logging to ``/dev/null`` like a library is supposed to.
|
|
|
|
# http://docs.python.org/3.3/howto/logging.html#configuring-logging-for-a-library
|
|
|
|
class NullHandler(logging.Handler): # pragma: no cover
|
|
|
|
def emit(self, record):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
2022-02-22 10:04:29 +00:00
|
|
|
logging.getLogger("cloudbender").addHandler(NullHandler())
|