Skip to content

Commit

Permalink
Improve logging for Client callable (#2883)
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesbvll authored Feb 1, 2024
1 parent e49a0c9 commit a3d34aa
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions src/py/flwr/client/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import argparse
import sys
import time
from logging import INFO, WARN
from logging import DEBUG, INFO, WARN
from pathlib import Path
from typing import Callable, ContextManager, Optional, Tuple, Union

Expand Down Expand Up @@ -62,7 +62,12 @@ def run_client() -> None:
"the '--root-certificates' option when running in insecure mode, "
"or omit '--insecure' to use HTTPS."
)
log(WARN, "Option `--insecure` was set. Starting insecure HTTP client.")
log(
WARN,
"Option `--insecure` was set. "
"Starting insecure HTTP client connected to %s.",
args.server,
)
root_certificates = None
else:
# Load the certificates if provided, or load the system certificates
Expand All @@ -71,11 +76,19 @@ def run_client() -> None:
root_certificates = None
else:
root_certificates = Path(cert_path).read_bytes()
log(
DEBUG,
"Starting secure HTTPS client connected to %s "
"with the following certificates: %s.",
args.server,
cert_path,
)

print(args.root_certificates)
print(args.server)
print(args.dir)
print(args.callable)
log(
DEBUG,
"The Flower client uses `%s` to execute tasks",
args.callable,
)

callable_dir = args.dir
if callable_dir is not None:
Expand Down

0 comments on commit a3d34aa

Please sign in to comment.