diff --git a/meilisearch/src/routes/logs.rs b/meilisearch/src/routes/logs.rs index 5d1c16833..5b3b82838 100644 --- a/meilisearch/src/routes/logs.rs +++ b/meilisearch/src/routes/logs.rs @@ -36,7 +36,7 @@ pub fn configure(cfg: &mut web::ServiceConfig) { #[deserr(rename_all = lowercase)] pub enum LogMode { #[default] - Fmt, + Human, Profile, } @@ -160,7 +160,7 @@ fn make_layer< ) -> (Box + Send + Sync>, PinnedByteStream) { let guard = HandleGuard { logs: logs.into_inner() }; match opt.mode { - LogMode::Fmt => { + LogMode::Human => { let (sender, receiver) = tokio::sync::mpsc::unbounded_channel(); let fmt_layer = tracing_subscriber::fmt::layer() diff --git a/meilisearch/tests/logs/error.rs b/meilisearch/tests/logs/error.rs index 384f134a7..4f4d741e3 100644 --- a/meilisearch/tests/logs/error.rs +++ b/meilisearch/tests/logs/error.rs @@ -89,7 +89,7 @@ async fn logs_stream_bad_mode() { snapshot!(code, @"400 Bad Request"); snapshot!(response, @r###" { - "message": "Unknown value `tamo` at `.mode`: expected one of `fmt`, `profile`", + "message": "Unknown value `tamo` at `.mode`: expected one of `human`, `profile`", "code": "bad_request", "type": "invalid_request", "link": "https://docs.meilisearch.com/errors#bad_request" @@ -133,7 +133,7 @@ async fn logs_stream_bad_profile_memory() { snapshot!(code, @"400 Bad Request"); snapshot!(response, @r###" { - "message": "Invalid value: `profile_memory` can only be used while profiling code and is not compatible with the Fmt mode.", + "message": "Invalid value: `profile_memory` can only be used while profiling code and is not compatible with the Human mode.", "code": "invalid_settings_typo_tolerance", "type": "invalid_request", "link": "https://docs.meilisearch.com/errors#invalid_settings_typo_tolerance" @@ -146,10 +146,10 @@ async fn logs_stream_bad_profile_memory() { snapshot!(code, @"400 Bad Request"); snapshot!(response, @r###" { - "message": "Invalid value: `profile_memory` can only be used while profiling code and is not compatible with the Fmt mode.", - "code": "invalid_settings_typo_tolerance", + "message": "Unknown value `fmt` at `.mode`: expected one of `human`, `profile`", + "code": "bad_request", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid_settings_typo_tolerance" + "link": "https://docs.meilisearch.com/errors#bad_request" } "###); } diff --git a/meilisearch/tests/logs/mod.rs b/meilisearch/tests/logs/mod.rs index 4091ac775..0002fe33c 100644 --- a/meilisearch/tests/logs/mod.rs +++ b/meilisearch/tests/logs/mod.rs @@ -57,7 +57,7 @@ async fn basic_test_log_stream_route() { .insert_header(ContentType::json()) .set_payload( serde_json::to_vec(&json!({ - "mode": "fmt", + "mode": "human", "target": "info", })) .unwrap(),