Commit 13b7549f authored by Samuel GAIST's avatar Samuel GAIST

[utils] Add helper method to build environment based key string

parent 751ff4c9
...@@ -178,3 +178,15 @@ def setup_logging(verbosity, format_name, name=None, stream=None): ...@@ -178,3 +178,15 @@ def setup_logging(verbosity, format_name, name=None, stream=None):
beat_backend_logger.setLevel(logging.WARNING) beat_backend_logger.setLevel(logging.WARNING)
return logging.getLogger(name) return logging.getLogger(name)
# ----------------------------------------------------------
def build_env_name(env_data):
"""Build the environment name used for string lookups"""
if not env_data:
return None
return "{name} ({version})".format(**env_data)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment