Skip to content

Commit

Permalink
Add verbose argument to ServerApp
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesbvll committed Mar 8, 2024
1 parent 22a7c5a commit 3f64135
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/py/flwr/server/run_serverapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from typing import Optional

from flwr.common import Context, EventType, RecordSet, event
from flwr.common.logger import log
from flwr.common.logger import log, logger

from .driver.driver import Driver
from .server_app import ServerApp, load_server_app
Expand Down Expand Up @@ -69,6 +69,10 @@ def run_server_app() -> None:

args = _parse_args_run_server_app().parse_args()

if args.verbose:
for handler in logger.handlers:
handler.setLevel(DEBUG)

# Obtain certificates
if args.insecure:
if args.root_certificates is not None:
Expand Down Expand Up @@ -146,6 +150,11 @@ def _parse_args_run_server_app() -> argparse.ArgumentParser:
help="Run the server app without HTTPS. By default, the app runs with "
"HTTPS enabled. Use this flag only if you understand the risks.",
)
parser.add_argument(
"--verbose",
action="store_true",
help="Set the logging to `DEBUG`.",
)
parser.add_argument(
"--root-certificates",
metavar="ROOT_CERT",
Expand Down

0 comments on commit 3f64135

Please sign in to comment.