#2716 Agent logging now sits outside of the simulation output log directory, updated dev-mode CLI to include agent logging and added additional tests.
This commit is contained in:
@@ -82,12 +82,31 @@ def config_callback(
|
||||
show_default=False,
|
||||
),
|
||||
] = None,
|
||||
agent_log_level: Annotated[
|
||||
LogLevel,
|
||||
typer.Option(
|
||||
"--agent-log-level",
|
||||
"-level",
|
||||
click_type=click.Choice(LogLevel._member_names_, case_sensitive=False),
|
||||
help="The level of agent behaviour logs to output.",
|
||||
show_default=False,
|
||||
),
|
||||
] = None,
|
||||
output_sys_logs: Annotated[
|
||||
bool,
|
||||
typer.Option(
|
||||
"--output-sys-logs/--no-sys-logs", "-sys/-nsys", help="Output system logs to file.", show_default=False
|
||||
),
|
||||
] = None,
|
||||
output_agent_logs: Annotated[
|
||||
bool,
|
||||
typer.Option(
|
||||
"--output-agent-logs/--no-agent-logs",
|
||||
"-agent/-nagent",
|
||||
help="Output agent logs to file.",
|
||||
show_default=False,
|
||||
),
|
||||
] = None,
|
||||
output_pcap_logs: Annotated[
|
||||
bool,
|
||||
typer.Option(
|
||||
@@ -109,10 +128,18 @@ def config_callback(
|
||||
PRIMAITE_CONFIG["developer_mode"]["sys_log_level"] = ctx.params.get("sys_log_level")
|
||||
print(f"PrimAITE dev-mode config updated sys_log_level={ctx.params.get('sys_log_level')}")
|
||||
|
||||
if ctx.params.get("agent_log_level") is not None:
|
||||
PRIMAITE_CONFIG["developer_mode"]["agent_log_level"] = ctx.params.get("agent_log_level")
|
||||
print(f"PrimAITE dev-mode config updated agent_log_level={ctx.params.get('agent_log_level')}")
|
||||
|
||||
if output_sys_logs is not None:
|
||||
PRIMAITE_CONFIG["developer_mode"]["output_sys_logs"] = output_sys_logs
|
||||
print(f"PrimAITE dev-mode config updated {output_sys_logs=}")
|
||||
|
||||
if output_agent_logs is not None:
|
||||
PRIMAITE_CONFIG["developer_mode"]["output_agent_logs"] = output_agent_logs
|
||||
print(f"PrimAITE dev-mode config updated {output_agent_logs=}")
|
||||
|
||||
if output_pcap_logs is not None:
|
||||
PRIMAITE_CONFIG["developer_mode"]["output_pcap_logs"] = output_pcap_logs
|
||||
print(f"PrimAITE dev-mode config updated {output_pcap_logs=}")
|
||||
|
||||
Reference in New Issue
Block a user