Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
beat
beat.core
Commits
13b7549f
Commit
13b7549f
authored
Jun 25, 2020
by
Samuel GAIST
Browse files
[utils] Add helper method to build environment based key string
parent
751ff4c9
Changes
1
Hide whitespace changes
Inline
Side-by-side
beat/core/utils.py
View file @
13b7549f
...
...
@@ -178,3 +178,15 @@ def setup_logging(verbosity, format_name, name=None, stream=None):
beat_backend_logger
.
setLevel
(
logging
.
WARNING
)
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
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment