🎨 Better logging init
This commit is contained in:
@@ -238,7 +238,10 @@ class CartridgesApplication(Adw.Application):
|
|||||||
|
|
||||||
|
|
||||||
def main(version): # pylint: disable=unused-argument
|
def main(version): # pylint: disable=unused-argument
|
||||||
log_level = os.environ.get("LOGLEVEL", "ERROR").upper()
|
# Initiate logger
|
||||||
logging.basicConfig(level="INFO") # TODO remove before release, use env
|
default_log_level = "DEBUG" if shared.PROFILE == "development" else "WARNING"
|
||||||
|
log_level = os.environ.get("LOGLEVEL", default_log_level).upper()
|
||||||
|
logging.basicConfig(level=log_level)
|
||||||
|
# Start app
|
||||||
app = CartridgesApplication()
|
app = CartridgesApplication()
|
||||||
return app.run(sys.argv)
|
return app.run(sys.argv)
|
||||||
|
|||||||
Reference in New Issue
Block a user