fix: setting the log level should only affect Unwind itself
Calling Unwind with DEBUG=1 caused a lot of debug messages from dependencies like HTTPX, aiosqlite, etc.
This commit is contained in:
parent
22c44bfa60
commit
5e4e70c9dc
1 changed files with 3 additions and 2 deletions
|
|
@ -5,7 +5,7 @@ import sys
|
||||||
|
|
||||||
from . import cli, config
|
from . import cli, config
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__package__)
|
||||||
|
|
||||||
|
|
||||||
def getargs():
|
def getargs():
|
||||||
|
|
@ -39,8 +39,9 @@ def main():
|
||||||
logging.basicConfig(
|
logging.basicConfig(
|
||||||
format="%(asctime)s.%(msecs)03d [%(name)s:%(process)d] %(levelname)s: %(message)s",
|
format="%(asctime)s.%(msecs)03d [%(name)s:%(process)d] %(levelname)s: %(message)s",
|
||||||
datefmt="%H:%M:%S",
|
datefmt="%H:%M:%S",
|
||||||
level=config.loglevel,
|
# level=config.loglevel,
|
||||||
)
|
)
|
||||||
|
log.setLevel(config.loglevel)
|
||||||
log.debug(f"Log level: {config.loglevel}")
|
log.debug(f"Log level: {config.loglevel}")
|
||||||
|
|
||||||
args = getargs()
|
args = getargs()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue