File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 3232# modification, are permitted provided that the following conditions are met:
3333#
3434import os
35+ import logging
3536
3637from flask import Flask , jsonify
3738from flask_restful import Api
@@ -55,11 +56,14 @@ def create_app(test_config=None, provided_translator=None):
5556 except OSError :
5657 pass
5758
59+ level = os .environ .get ('LOG_LEVEL' , 'INFO' ).upper ()
60+ app .logger .level = getattr (logging , level , None )
61+
5862 if test_config :
5963 app .config .from_mapping (test_config )
6064 else :
6165 if 'CODEGEN_CONFIG_FILE' in os .environ :
62- print ( 'Read Transformer Image on Init: ' , os .environ .get ('TRANSFORMER_SCIENCE_IMAGE' ))
66+ app . logger . info ( os .environ .get ('TRANSFORMER_SCIENCE_IMAGE' ))
6367 app .config .from_envvar ('CODEGEN_CONFIG_FILE' )
6468
6569 with app .app_context ():
You can’t perform that action at this time.
0 commit comments