mirror of
https://github.com/openai/codex.git
synced 2026-05-25 13:34:51 +00:00
In the log client, use the log level filter as a minimum severity instead of exact match --------- Co-authored-by: Codex <noreply@openai.com>
47 lines
1.1 KiB
Rust
47 lines
1.1 KiB
Rust
use serde::Serialize;
|
|
use sqlx::FromRow;
|
|
|
|
#[derive(Clone, Debug, Serialize)]
|
|
pub struct LogEntry {
|
|
pub ts: i64,
|
|
pub ts_nanos: i64,
|
|
pub level: String,
|
|
pub target: String,
|
|
pub message: Option<String>,
|
|
pub feedback_log_body: Option<String>,
|
|
pub thread_id: Option<String>,
|
|
pub process_uuid: Option<String>,
|
|
pub module_path: Option<String>,
|
|
pub file: Option<String>,
|
|
pub line: Option<i64>,
|
|
}
|
|
|
|
#[derive(Clone, Debug, FromRow)]
|
|
pub struct LogRow {
|
|
pub id: i64,
|
|
pub ts: i64,
|
|
pub ts_nanos: i64,
|
|
pub level: String,
|
|
pub target: String,
|
|
pub message: Option<String>,
|
|
pub thread_id: Option<String>,
|
|
pub process_uuid: Option<String>,
|
|
pub file: Option<String>,
|
|
pub line: Option<i64>,
|
|
}
|
|
|
|
#[derive(Clone, Debug, Default)]
|
|
pub struct LogQuery {
|
|
pub levels_upper: Vec<String>,
|
|
pub from_ts: Option<i64>,
|
|
pub to_ts: Option<i64>,
|
|
pub module_like: Vec<String>,
|
|
pub file_like: Vec<String>,
|
|
pub thread_ids: Vec<String>,
|
|
pub search: Option<String>,
|
|
pub include_threadless: bool,
|
|
pub after_id: Option<i64>,
|
|
pub limit: Option<usize>,
|
|
pub descending: bool,
|
|
}
|