Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Log level could not be configured from settings #581

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/aleph/vm/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ class Settings(BaseSettings):
# System logs make boot ~2x slower
PRINT_SYSTEM_LOGS = False
IGNORE_TRACEBACK_FROM_DIAGNOSTICS = True
LOG_LEVEL = "WARNING"
DEBUG_ASYNCIO = False

# Networking does not work inside Docker/Podman
Expand Down
10 changes: 6 additions & 4 deletions src/aleph/vm/orchestrator/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,10 +294,6 @@ def main():
if args.profile
else "%(asctime)s | %(levelname)s | %(message)s"
)
logging.basicConfig(
level=args.loglevel,
format=log_format,
)

settings.update(
USE_JAILER=args.use_jailer,
Expand All @@ -307,6 +303,12 @@ def main():
FAKE_DATA_PROGRAM=args.fake_data_program,
DEBUG_ASYNCIO=args.debug_asyncio,
FAKE_INSTANCE_BASE=args.fake_instance_base,
LOG_LEVEL=logging.getLevelName(args.loglevel),
)

logging.basicConfig(
level=settings.loglevel,
olethanh marked this conversation as resolved.
Show resolved Hide resolved
format=log_format,
)

if args.run_fake_instance:
Expand Down
Loading