You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/event/format/known_schema.rs
+78Lines changed: 78 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -513,4 +513,82 @@ mod tests {
513
513
assert!(!obj.contains_key("level"));
514
514
assert!(!obj.contains_key("timestamp"));
515
515
}
516
+
517
+
#[test]
518
+
fntest_rust_server_logs(){
519
+
let processor = EventProcessor::new(FORMATS_JSON);
520
+
let schema = processor
521
+
.schema_definitions
522
+
.get("rust_server_logs")
523
+
.unwrap();
524
+
525
+
let test_logs = vec![
526
+
// Current parseable format with ThreadId
527
+
"2025-09-06T10:43:01.628980875Z WARN main ThreadId(01) parseable::handlers::http::cluster:919: node http://0.0.0.0:8010/ is not live",
528
+
"2025-09-06T10:44:12.62276265Z ERROR actix-rt|system:0|arbiter:17 ThreadId(163) parseable_enterprise::http::handlers::query:43: JsonParse(\"Datafusion Error: Schema error: No field named a. Valid fields are serverlogs.log\")",
529
+
"2025-09-06T05:16:46.092071318Z ERROR actix-rt|system:0|arbiter:21 ThreadId(167) parseable_enterprise::http::handlers::query:43: JsonParse(\"Datafusion Error: Schema error: No field named ansible.host.ip\")",
530
+
"2025-09-06T11:22:07.500864363Z WARN main ThreadId(01) parseable_enterprise:70: Received shutdown signal, notifying server to shut down...",
531
+
// env_logger format
532
+
"[2025-09-06T10:43:01.628980875Z INFO parseable::storage] Initializing storage backend",
533
+
"[2025-09-06T10:43:01.628980875Z ERROR parseable::http::ingest] Failed to parse JSON",
534
+
// Simple tracing format (no ThreadId)
535
+
"2025-09-06T10:43:01.628980875Z INFO parseable::storage::s3: Storage configured successfully",
536
+
"2025-09-06T10:43:01.628980875Z DEBUG parseable::query::engine: Query executed in 45ms",
0 commit comments