diff --git a/README.md b/README.md index 273253ad4f..8d21f78207 100644 --- a/README.md +++ b/README.md @@ -216,7 +216,7 @@ evaluation environments, and reinforcement-learning workloads. screenshots, and low-frequency CPU-rendered DevTools screencast frames. - **Controllable operational options** — profiles, cookies, HTTP cache, proxies, resource families, connection limits, timeouts, private-network policy, - user-agent overrides, structured logging, and network diagnostics are all + user-agent overrides, diagnostic logging, and network diagnostics are all available. ## Moli's relationship with Lexmount diff --git a/moli-frontend-smoke/moli_frontend_smoke/browsers.py b/moli-frontend-smoke/moli_frontend_smoke/browsers.py index e28a3762cd..c349792321 100644 --- a/moli-frontend-smoke/moli_frontend_smoke/browsers.py +++ b/moli-frontend-smoke/moli_frontend_smoke/browsers.py @@ -272,8 +272,6 @@ async def start_moli(binary: Path, *, max_connections: int) -> BrowserProcess: cache_dir, "--log-level", "info", - "--log-format", - "logfmt", ], ) diff --git a/moli/src/cli.rs b/moli/src/cli.rs index a5d5ae3a89..fa43063216 100644 --- a/moli/src/cli.rs +++ b/moli/src/cli.rs @@ -465,9 +465,6 @@ pub struct CommonArgs { #[arg(short = 'L', long, value_enum)] pub log_level: Option, - #[arg(long, value_enum)] - pub log_format: Option, - #[arg(long, num_args = 0..=1, default_missing_value = "")] pub log_filter_scopes: Option, @@ -535,13 +532,6 @@ impl LogLevel { } } -#[derive(Debug, Clone, Copy, PartialEq, Eq, ValueEnum)] -#[value(rename_all = "snake_case")] -pub enum LogFormat { - Pretty, - Logfmt, -} - #[derive(Debug, Clone, Copy, PartialEq, Eq, ValueEnum)] #[value(rename_all = "snake_case")] pub enum DumpFormat { diff --git a/moli/src/config.rs b/moli/src/config.rs index 2c93c444bf..19fd9832bf 100644 --- a/moli/src/config.rs +++ b/moli/src/config.rs @@ -10,9 +10,7 @@ use moli_fetch::{FetchConfig, WebBotAuthProfile, WebBotAuthSigner}; use std::path::PathBuf; use std::str::FromStr; -use crate::cli::{ - Cli, Commands, CommonArgs, DumpFormat, LogFormat, StripOptions, WebBotAuthProfileChoice, -}; +use crate::cli::{Cli, Commands, CommonArgs, DumpFormat, StripOptions, WebBotAuthProfileChoice}; use crate::network_trace::NetworkTraceConfigSummary; pub use moli_protocol_server::ServerConfig; @@ -200,7 +198,6 @@ fn apply_common_args(config: &mut AppConfig, common: &CommonArgs) -> Result<()> config.add_document_start_script(source); } - config.fetch.log_format = common.log_format; config.fetch.log_filter_scopes = common.log_filter_scopes.clone(); Ok(()) } @@ -293,7 +290,6 @@ pub struct FetchCommandConfig { pub cookie_files: Vec, // CLI request headers only apply to the top-level fetch command. pub request_headers: Vec<(String, String)>, - pub log_format: Option, pub log_filter_scopes: Option, } diff --git a/moli/tests/cli.rs b/moli/tests/cli.rs index 1ab53c7b03..ed253d3135 100644 --- a/moli/tests/cli.rs +++ b/moli/tests/cli.rs @@ -8,9 +8,9 @@ use std::{ }; use moli::cli::{ - Cli, Commands, CommonArgs, DumpFormat, FetchArgs, FetchWaitUntil, LogFormat, LogLevel, - RequestHeaderArg, ResponseJsonPathArg, ResponseRegexArg, ServeArgs, StripModeChoice, - StripOptions, WebBotAuthProfileChoice, normalize_args_for_compat, + Cli, Commands, CommonArgs, DumpFormat, FetchArgs, FetchWaitUntil, LogLevel, RequestHeaderArg, + ResponseJsonPathArg, ResponseRegexArg, ServeArgs, StripModeChoice, StripOptions, + WebBotAuthProfileChoice, normalize_args_for_compat, }; use moli::config::AppConfig; use moli_browser_profile::BrowserProfilePaths; @@ -62,8 +62,6 @@ fn parses_explicit_fetch_command_with_compatibility_flags() { "4096", "--log-level", "info", - "--log-format", - "pretty", "--log-filter-scopes", "http,event", "--user-agent-suffix", @@ -137,7 +135,6 @@ fn parses_explicit_fetch_command_with_compatibility_flags() { block_private_networks: false, block_cidrs: None, log_level: Some(LogLevel::Info), - log_format: Some(LogFormat::Pretty), log_filter_scopes: Some("http,event".to_owned()), user_agent: None, user_agent_suffix: Some("internal-tester".to_owned()), @@ -1394,6 +1391,7 @@ fn removed_long_form_flags_are_rejected() { "--enable-video-fetch", "--enable-media-fetch", "--enable-text-track-fetch", + "--log-format", ] { let error = Cli::try_parse_from(["moli", "serve", flag]).unwrap_err(); assert_eq!(error.kind(), clap::error::ErrorKind::UnknownArgument);