diff --git a/skyline_apiserver/log/__init__.py b/skyline_apiserver/log/__init__.py index 35346e2..f86512c 100644 --- a/skyline_apiserver/log/__init__.py +++ b/skyline_apiserver/log/__init__.py @@ -54,7 +54,7 @@ def setup( backtrace = True diagnose = True else: - default_level = "WARNING" + default_level = "INFO" backtrace = False diagnose = True if level is None: diff --git a/skyline_apiserver/main.py b/skyline_apiserver/main.py index ba7c571..00422fa 100644 --- a/skyline_apiserver/main.py +++ b/skyline_apiserver/main.py @@ -31,7 +31,10 @@ API_PREFIX = "/api/v1" async def on_startup() -> None: configure("skyline") - log_setup(Path(CONF.default.log_dir).joinpath("skyline", "skyline-apiserver.log")) + log_setup( + Path(CONF.default.log_dir).joinpath("skyline", "skyline-apiserver.log"), + debug=CONF.default.debug, + ) policies_setup() await db_setup() diff --git a/skyline_apiserver/tests/unit/log/test_log.py b/skyline_apiserver/tests/unit/log/test_log.py index d4e89e5..c95bc7b 100644 --- a/skyline_apiserver/tests/unit/log/test_log.py +++ b/skyline_apiserver/tests/unit/log/test_log.py @@ -87,7 +87,7 @@ class TestLog: log = getattr(LOG, level) log(content) file_content = file_sink_captor.read_text() - if debug is False and level in ["debug", "info"]: + if debug is False and level in ["debug"]: assert f"| {level.upper():<8} |" not in file_content assert content not in file_content else: @@ -159,7 +159,7 @@ class TestLog: log = getattr(LOG, level) log(content) std_out, std_err = stream_sink_captor.readouterr() - if debug is False and level in ["debug", "info"]: + if debug is False and level in ["debug"]: assert f"| {level.upper():<8} |" not in std_err assert content not in std_err else: @@ -219,7 +219,7 @@ class TestLog: log = getattr(std_logger, level) log(content) file_content = file_sink_captor.read_text() - if debug is False and level in ["debug", "info"]: + if debug is False and level in ["debug"]: assert f"| {level.upper():<8} |" not in file_content assert content not in file_content else: