Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logging changes #1804

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions fastn-core/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ pub struct RequestConfig {
pub module_package_map: std::collections::BTreeMap<String, String>,
/// each string is the value of Set-Cookie header
pub processor_set_cookies: Vec<String>,
pub log: std::sync::Arc<std::sync::RwLock<Option<fastn_core::log::Log>>>,
}

impl RequestConfig {
Expand Down Expand Up @@ -94,6 +95,7 @@ impl RequestConfig {
base_url: base_url.to_string(),
module_package_map: Default::default(),
processor_set_cookies: Default::default(),
log: Default::default(),
}
}

Expand Down
2 changes: 2 additions & 0 deletions fastn-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
pub mod catch_panic;
pub(crate) mod google_sheets;
mod library2022;
pub mod log;
mod mail;

Check failure on line 37 in fastn-core/src/lib.rs

View workflow job for this annotation

GitHub Actions / Rust/JS Checks/Formatting

file not found for module `mail`

Check failure on line 37 in fastn-core/src/lib.rs

View workflow job for this annotation

GitHub Actions / Rust/JS Checks/Formatting

file not found for module `mail`

pub(crate) use auto_import::AutoImport;
pub use commands::{
Expand Down
8 changes: 8 additions & 0 deletions fastn-core/src/log.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#[derive(Debug, Default)]
pub struct Log {
pub ekind: String,
pub okind: String,
pub outcome: String,
pub outcome_data: serde_json::Value,
pub input: serde_json::Value,
}
Loading