Make it possible to set the log level through env LOG_LEVEL
This commit is contained in:
parent
2273253aef
commit
99cfea6d62
1 changed files with 4 additions and 2 deletions
|
@ -1,10 +1,12 @@
|
||||||
|
import logging
|
||||||
|
import os
|
||||||
import revbank
|
import revbank
|
||||||
import sys
|
import sys
|
||||||
import logging
|
|
||||||
|
|
||||||
|
|
||||||
def main(product_file):
|
def main(product_file):
|
||||||
logging.basicConfig(level=logging.INFO)
|
log_level = os.environ.get('LOG_LEVEL', 'INFO').upper()
|
||||||
|
logging.basicConfig(level=log_level)
|
||||||
logging.getLogger("requests").setLevel(logging.WARNING)
|
logging.getLogger("requests").setLevel(logging.WARNING)
|
||||||
logging.getLogger("urllib3").setLevel(logging.WARNING)
|
logging.getLogger("urllib3").setLevel(logging.WARNING)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue