While we are loading environment vars, could be nice to have some logging messages but theres a problem, init_log is executes after load_env since we need to use "LOG_LEVEL" var. Maybe we can just stay without logging but will be nice to have a looks at this.
Some code for reference:
def load_env(filename=".env") -> None:
if not os.path.isfile(filename):
return
logger.info(f"Loading environment vars from {filename}")
try:
stream = open(filename, "r")
buffer = stream.readlines()
stream.close()
except Exception as e:
logger.err(e)
return
While we are loading environment vars, could be nice to have some logging messages but theres a problem, init_log is executes after load_env since we need to use "LOG_LEVEL" var. Maybe we can just stay without logging but will be nice to have a looks at this.
Some code for reference: