From d0ad87047d20832c600e0247f2257eb82fcfe912 Mon Sep 17 00:00:00 2001 From: Ed Murphy Date: Mon, 4 Apr 2022 20:19:42 +0000 Subject: [PATCH] Set LOG_LEVEL environment variable to set log level (#1002) --- donkeycar/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/donkeycar/__init__.py b/donkeycar/__init__.py index 209c11995..f13cc178c 100644 --- a/donkeycar/__init__.py +++ b/donkeycar/__init__.py @@ -1,3 +1,4 @@ +import os import sys from pyfiglet import Figlet import logging @@ -5,7 +6,8 @@ __version__ = get_distribution('donkeycar').version -logging.basicConfig(level=logging.INFO) +logging.basicConfig(level=os.environ.get('LOGLEVEL', 'INFO').upper()) + f = Figlet(font='speed')