We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3fce03d commit c1b6645Copy full SHA for c1b6645
src/environment.py
@@ -1,4 +1,5 @@
1
import os
2
+import logging
3
4
5
def load_env(key: str, default: str) -> str:
@@ -13,9 +14,12 @@ def load_env(key: str, default: str) -> str:
13
14
if value:
15
return value
16
print(f"Can't load env-variable for: '{key}' - falling back to DEFAULT {key}='{default}'")
17
+ logger.warning(f"Can't load env-variable for: '{key}' - falling back to DEFAULT {key}='{default}'")
18
return default
19
20
21
+logger = logging.getLogger('my-bot')
22
+
23
TOKEN = os.getenv("TOKEN") # reading in the token from config.py file
24
25
# loading optional env variables
0 commit comments