Skip to content

Commit

Permalink
add level name to log
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiao-Chenguang committed Oct 22, 2024
1 parent 43146c4 commit 4f8f6fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fedmind/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def train_process(
"""
logging.basicConfig(
level=log_level,
format="%(asctime)s [%(processName)s] %(message)s",
format="%(asctime)s %(levelname)s [%(processName)s] %(message)s",
)
logger = logging.getLogger(f"Worker-{worker_id}")
logger.info(f"Worker-{worker_id} started.")
Expand Down
2 changes: 1 addition & 1 deletion fedmind/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def __init__(

logging.basicConfig(
level=args.LOG_LEVEL, # type: ignore
format="%(asctime)s [%(processName)s] %(message)s",
format="%(asctime)s %(levelname)s [%(processName)s] %(message)s",
)
self.logger = logging.getLogger("Server")
self.logger.info(f"Get following configs:\n{yaml.dump(args.to_dict())}")
Expand Down

0 comments on commit 4f8f6fc

Please sign in to comment.