mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-19 11:06:17 +00:00
rename rustfs-logging to rustfs-obs
This commit is contained in:
Generated
+160
-12
@@ -1377,7 +1377,7 @@ dependencies = [
|
|||||||
"futures-util",
|
"futures-util",
|
||||||
"generational-box",
|
"generational-box",
|
||||||
"longest-increasing-subsequence",
|
"longest-increasing-subsequence",
|
||||||
"rustc-hash",
|
"rustc-hash 1.1.0",
|
||||||
"rustversion",
|
"rustversion",
|
||||||
"serde",
|
"serde",
|
||||||
"slab",
|
"slab",
|
||||||
@@ -1443,7 +1443,7 @@ dependencies = [
|
|||||||
"objc_id",
|
"objc_id",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"rfd 0.14.1",
|
"rfd 0.14.1",
|
||||||
"rustc-hash",
|
"rustc-hash 1.1.0",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"signal-hook",
|
"signal-hook",
|
||||||
@@ -1604,7 +1604,7 @@ dependencies = [
|
|||||||
"dioxus-html",
|
"dioxus-html",
|
||||||
"js-sys",
|
"js-sys",
|
||||||
"lazy-js-bundle",
|
"lazy-js-bundle",
|
||||||
"rustc-hash",
|
"rustc-hash 1.1.0",
|
||||||
"serde",
|
"serde",
|
||||||
"sledgehammer_bindgen",
|
"sledgehammer_bindgen",
|
||||||
"sledgehammer_utils",
|
"sledgehammer_utils",
|
||||||
@@ -1710,7 +1710,7 @@ dependencies = [
|
|||||||
"generational-box",
|
"generational-box",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"parking_lot 0.12.3",
|
"parking_lot 0.12.3",
|
||||||
"rustc-hash",
|
"rustc-hash 1.1.0",
|
||||||
"tracing",
|
"tracing",
|
||||||
"warnings",
|
"warnings",
|
||||||
]
|
]
|
||||||
@@ -1737,7 +1737,7 @@ dependencies = [
|
|||||||
"generational-box",
|
"generational-box",
|
||||||
"js-sys",
|
"js-sys",
|
||||||
"lazy-js-bundle",
|
"lazy-js-bundle",
|
||||||
"rustc-hash",
|
"rustc-hash 1.1.0",
|
||||||
"serde",
|
"serde",
|
||||||
"serde-wasm-bindgen",
|
"serde-wasm-bindgen",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
@@ -1971,6 +1971,15 @@ version = "1.14.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b7914353092ddf589ad78f25c5c1c21b7f80b0ff8621e7c814c3485b5306da9d"
|
checksum = "b7914353092ddf589ad78f25c5c1c21b7f80b0ff8621e7c814c3485b5306da9d"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "encoding_rs"
|
||||||
|
version = "0.8.35"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3"
|
||||||
|
dependencies = [
|
||||||
|
"cfg-if",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "endi"
|
name = "endi"
|
||||||
version = "1.1.0"
|
version = "1.1.0"
|
||||||
@@ -2881,6 +2890,24 @@ dependencies = [
|
|||||||
"want",
|
"want",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "hyper-rustls"
|
||||||
|
version = "0.27.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2"
|
||||||
|
dependencies = [
|
||||||
|
"futures-util",
|
||||||
|
"http",
|
||||||
|
"hyper",
|
||||||
|
"hyper-util",
|
||||||
|
"rustls",
|
||||||
|
"rustls-pki-types",
|
||||||
|
"tokio",
|
||||||
|
"tokio-rustls",
|
||||||
|
"tower-service",
|
||||||
|
"webpki-roots",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "hyper-timeout"
|
name = "hyper-timeout"
|
||||||
version = "0.5.2"
|
version = "0.5.2"
|
||||||
@@ -4912,6 +4939,58 @@ dependencies = [
|
|||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "quinn"
|
||||||
|
version = "0.11.6"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "62e96808277ec6f97351a2380e6c25114bc9e67037775464979f3037c92d05ef"
|
||||||
|
dependencies = [
|
||||||
|
"bytes",
|
||||||
|
"pin-project-lite",
|
||||||
|
"quinn-proto",
|
||||||
|
"quinn-udp",
|
||||||
|
"rustc-hash 2.1.1",
|
||||||
|
"rustls",
|
||||||
|
"socket2",
|
||||||
|
"thiserror 2.0.11",
|
||||||
|
"tokio",
|
||||||
|
"tracing",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "quinn-proto"
|
||||||
|
version = "0.11.9"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "a2fe5ef3495d7d2e377ff17b1a8ce2ee2ec2a18cde8b6ad6619d65d0701c135d"
|
||||||
|
dependencies = [
|
||||||
|
"bytes",
|
||||||
|
"getrandom 0.2.15",
|
||||||
|
"rand 0.8.5",
|
||||||
|
"ring",
|
||||||
|
"rustc-hash 2.1.1",
|
||||||
|
"rustls",
|
||||||
|
"rustls-pki-types",
|
||||||
|
"slab",
|
||||||
|
"thiserror 2.0.11",
|
||||||
|
"tinyvec",
|
||||||
|
"tracing",
|
||||||
|
"web-time",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "quinn-udp"
|
||||||
|
version = "0.5.10"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "e46f3055866785f6b92bc6164b76be02ca8f2eb4b002c0354b28cf4c119e5944"
|
||||||
|
dependencies = [
|
||||||
|
"cfg_aliases",
|
||||||
|
"libc",
|
||||||
|
"once_cell",
|
||||||
|
"socket2",
|
||||||
|
"tracing",
|
||||||
|
"windows-sys 0.52.0",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "quote"
|
name = "quote"
|
||||||
version = "1.0.38"
|
version = "1.0.38"
|
||||||
@@ -5197,19 +5276,16 @@ checksum = "43e734407157c3c2034e0258f5e4473ddb361b1e85f95a66690d67264d7cd1da"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"base64",
|
"base64",
|
||||||
"bytes",
|
"bytes",
|
||||||
<<<<<<< HEAD
|
|
||||||
"encoding_rs",
|
"encoding_rs",
|
||||||
"futures-channel",
|
"futures-channel",
|
||||||
||||||| e65bee0
|
|
||||||
"encoding_rs",
|
|
||||||
=======
|
|
||||||
>>>>>>> 1d58a07f296b9dedba832bb31b31eb9faf38b85c
|
|
||||||
"futures-core",
|
"futures-core",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
|
"h2",
|
||||||
"http",
|
"http",
|
||||||
"http-body",
|
"http-body",
|
||||||
"http-body-util",
|
"http-body-util",
|
||||||
"hyper",
|
"hyper",
|
||||||
|
"hyper-rustls",
|
||||||
"hyper-util",
|
"hyper-util",
|
||||||
"ipnet",
|
"ipnet",
|
||||||
"js-sys",
|
"js-sys",
|
||||||
@@ -5219,11 +5295,17 @@ dependencies = [
|
|||||||
"once_cell",
|
"once_cell",
|
||||||
"percent-encoding",
|
"percent-encoding",
|
||||||
"pin-project-lite",
|
"pin-project-lite",
|
||||||
|
"quinn",
|
||||||
|
"rustls",
|
||||||
|
"rustls-pemfile",
|
||||||
|
"rustls-pki-types",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"serde_urlencoded",
|
"serde_urlencoded",
|
||||||
"sync_wrapper",
|
"sync_wrapper",
|
||||||
|
"system-configuration",
|
||||||
"tokio",
|
"tokio",
|
||||||
|
"tokio-rustls",
|
||||||
"tokio-util",
|
"tokio-util",
|
||||||
"tower 0.5.2",
|
"tower 0.5.2",
|
||||||
"tower-service",
|
"tower-service",
|
||||||
@@ -5232,6 +5314,7 @@ dependencies = [
|
|||||||
"wasm-bindgen-futures",
|
"wasm-bindgen-futures",
|
||||||
"wasm-streams",
|
"wasm-streams",
|
||||||
"web-sys",
|
"web-sys",
|
||||||
|
"webpki-roots",
|
||||||
"windows-registry",
|
"windows-registry",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -5365,6 +5448,12 @@ version = "1.1.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
|
checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "rustc-hash"
|
||||||
|
version = "2.1.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustc_version"
|
name = "rustc_version"
|
||||||
version = "0.4.1"
|
version = "0.4.1"
|
||||||
@@ -5416,6 +5505,7 @@ dependencies = [
|
|||||||
"protos",
|
"protos",
|
||||||
"rmp-serde",
|
"rmp-serde",
|
||||||
"rust-embed",
|
"rust-embed",
|
||||||
|
"rustfs-obs",
|
||||||
"s3s",
|
"s3s",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
@@ -5460,7 +5550,7 @@ dependencies = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustfs-logging"
|
name = "rustfs-obs"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
@@ -5522,6 +5612,9 @@ name = "rustls-pki-types"
|
|||||||
version = "1.11.0"
|
version = "1.11.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "917ce264624a4b4db1c364dcc35bfca9ded014d0a958cd47ad3e960e988ea51c"
|
checksum = "917ce264624a4b4db1c364dcc35bfca9ded014d0a958cd47ad3e960e988ea51c"
|
||||||
|
dependencies = [
|
||||||
|
"web-time",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustls-webpki"
|
name = "rustls-webpki"
|
||||||
@@ -6024,7 +6117,7 @@ version = "0.3.1"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "debdd4b83524961983cea3c55383b3910fd2f24fd13a188f5b091d2d504a61ae"
|
checksum = "debdd4b83524961983cea3c55383b3910fd2f24fd13a188f5b091d2d504a61ae"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"rustc-hash",
|
"rustc-hash 1.1.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -6208,6 +6301,27 @@ dependencies = [
|
|||||||
"syn 2.0.98",
|
"syn 2.0.98",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "system-configuration"
|
||||||
|
version = "0.6.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b"
|
||||||
|
dependencies = [
|
||||||
|
"bitflags 2.9.0",
|
||||||
|
"core-foundation 0.9.4",
|
||||||
|
"system-configuration-sys",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "system-configuration-sys"
|
||||||
|
version = "0.6.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4"
|
||||||
|
dependencies = [
|
||||||
|
"core-foundation-sys",
|
||||||
|
"libc",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "system-deps"
|
name = "system-deps"
|
||||||
version = "6.2.2"
|
version = "6.2.2"
|
||||||
@@ -6435,6 +6549,21 @@ dependencies = [
|
|||||||
"zerovec",
|
"zerovec",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "tinyvec"
|
||||||
|
version = "1.9.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "09b3661f17e86524eccd4371ab0429194e0d7c008abb45f7a7495b1719463c71"
|
||||||
|
dependencies = [
|
||||||
|
"tinyvec_macros",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "tinyvec_macros"
|
||||||
|
version = "0.1.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tokio"
|
name = "tokio"
|
||||||
version = "1.43.0"
|
version = "1.43.0"
|
||||||
@@ -7227,6 +7356,16 @@ dependencies = [
|
|||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "web-time"
|
||||||
|
version = "1.1.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb"
|
||||||
|
dependencies = [
|
||||||
|
"js-sys",
|
||||||
|
"wasm-bindgen",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "webbrowser"
|
name = "webbrowser"
|
||||||
version = "0.8.15"
|
version = "0.8.15"
|
||||||
@@ -7288,6 +7427,15 @@ dependencies = [
|
|||||||
"system-deps",
|
"system-deps",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "webpki-roots"
|
||||||
|
version = "0.26.8"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "2210b291f7ea53617fbafcc4939f10914214ec15aace5ba62293a668f322c5c9"
|
||||||
|
dependencies = [
|
||||||
|
"rustls-pki-types",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "webview2-com"
|
name = "webview2-com"
|
||||||
version = "0.33.0"
|
version = "0.33.0"
|
||||||
|
|||||||
+2
-2
@@ -13,7 +13,7 @@ members = [
|
|||||||
"iam", # Identity and Access Management
|
"iam", # Identity and Access Management
|
||||||
"crypto", # Cryptography and security features
|
"crypto", # Cryptography and security features
|
||||||
"cli/rustfs-gui", # Graphical user interface client
|
"cli/rustfs-gui", # Graphical user interface client
|
||||||
"packages/logging", # Logging utilities
|
"packages/obs", # Observability utilities
|
||||||
]
|
]
|
||||||
resolver = "2"
|
resolver = "2"
|
||||||
|
|
||||||
@@ -81,7 +81,7 @@ rdkafka = { version = "0.37", features = ["tokio"] }
|
|||||||
rfd = { version = "0.15.2", default-features = false, features = ["xdg-portal", "tokio"] }
|
rfd = { version = "0.15.2", default-features = false, features = ["xdg-portal", "tokio"] }
|
||||||
rmp = "0.8.14"
|
rmp = "0.8.14"
|
||||||
rmp-serde = "1.3.0"
|
rmp-serde = "1.3.0"
|
||||||
rustfs-logging = { path = "packages/logging", version = "0.0.1" }
|
rustfs-obs = { path = "packages/obs", version = "0.0.1" }
|
||||||
rust-embed = "8.6.0"
|
rust-embed = "8.6.0"
|
||||||
s3s = { git = "https://github.com/Nugine/s3s.git", rev = "ab139f72fe768fb9d8cecfe36269451da1ca9779", default-features = true, features = [
|
s3s = { git = "https://github.com/Nugine/s3s.git", rev = "ab139f72fe768fb9d8cecfe36269451da1ca9779", default-features = true, features = [
|
||||||
"tower",
|
"tower",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "rustfs-logging"
|
name = "rustfs-obs"
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
license.workspace = true
|
license.workspace = true
|
||||||
repository.workspace = true
|
repository.workspace = true
|
||||||
@@ -23,7 +23,7 @@ use tokio::sync::mpsc;
|
|||||||
/// * `span_id` - The span ID of the event
|
/// * `span_id` - The span ID of the event
|
||||||
/// # Example
|
/// # Example
|
||||||
/// ```
|
/// ```
|
||||||
/// use rustfs_logging::AuditEntry;
|
/// use rustfs_obs::AuditEntry;
|
||||||
/// let entry = AuditEntry {
|
/// let entry = AuditEntry {
|
||||||
/// version: "1.0".to_string(),
|
/// version: "1.0".to_string(),
|
||||||
/// event_type: "read".to_string(),
|
/// event_type: "read".to_string(),
|
||||||
@@ -63,7 +63,7 @@ impl AuditTarget for FileAuditTarget {
|
|||||||
///
|
///
|
||||||
/// # Example
|
/// # Example
|
||||||
/// ```
|
/// ```
|
||||||
/// use rustfs_logging::{AuditEntry, AuditTarget, FileAuditTarget};
|
/// use rustfs_obs::{AuditEntry, AuditTarget, FileAuditTarget};
|
||||||
/// let entry = AuditEntry {
|
/// let entry = AuditEntry {
|
||||||
/// version: "1.0".to_string(),
|
/// version: "1.0".to_string(),
|
||||||
/// event_type: "read".to_string(),
|
/// event_type: "read".to_string(),
|
||||||
@@ -88,7 +88,7 @@ impl AuditTarget for FileAuditTarget {
|
|||||||
/// * `url` - The URL of the webhook
|
/// * `url` - The URL of the webhook
|
||||||
/// # Example
|
/// # Example
|
||||||
/// ```
|
/// ```
|
||||||
/// use rustfs_logging::WebhookAuditTarget;
|
/// use rustfs_obs::WebhookAuditTarget;
|
||||||
/// let target = WebhookAuditTarget::new("http://localhost:8080");
|
/// let target = WebhookAuditTarget::new("http://localhost:8080");
|
||||||
/// ```
|
/// ```
|
||||||
pub struct WebhookAuditTarget {
|
pub struct WebhookAuditTarget {
|
||||||
@@ -126,7 +126,7 @@ impl AuditTarget for WebhookAuditTarget {
|
|||||||
/// * `topic` - The Kafka topic
|
/// * `topic` - The Kafka topic
|
||||||
/// # Example
|
/// # Example
|
||||||
/// ```
|
/// ```
|
||||||
/// use rustfs_logging::KafkaAuditTarget;
|
/// use rustfs_obs::KafkaAuditTarget;
|
||||||
/// let target = KafkaAuditTarget::new("localhost:9092", "rustfs-audit");
|
/// let target = KafkaAuditTarget::new("localhost:9092", "rustfs-audit");
|
||||||
/// ```
|
/// ```
|
||||||
/// # Note
|
/// # Note
|
||||||
@@ -135,7 +135,7 @@ impl AuditTarget for WebhookAuditTarget {
|
|||||||
/// ```toml
|
/// ```toml
|
||||||
/// [dependencies]
|
/// [dependencies]
|
||||||
/// rdkafka = "0.26.0"
|
/// rdkafka = "0.26.0"
|
||||||
/// rustfs_logging = { version = "0.1.0", features = ["audit-kafka"] }
|
/// rustfs_obs = { version = "0.1.0", features = ["audit-kafka"] }
|
||||||
/// ```
|
/// ```
|
||||||
/// # Note
|
/// # Note
|
||||||
/// The `rdkafka` crate requires the `librdkafka` library to be installed
|
/// The `rdkafka` crate requires the `librdkafka` library to be installed
|
||||||
@@ -214,7 +214,7 @@ impl AuditTarget for KafkaAuditTarget {
|
|||||||
///
|
///
|
||||||
/// # Example
|
/// # Example
|
||||||
/// ```
|
/// ```
|
||||||
/// use rustfs_logging::{AuditEntry, AuditLogger, FileAuditTarget};
|
/// use rustfs_obs::{AuditEntry, AuditLogger, FileAuditTarget};
|
||||||
///
|
///
|
||||||
/// #[tokio::main]
|
/// #[tokio::main]
|
||||||
/// async fn main() {
|
/// async fn main() {
|
||||||
@@ -238,7 +238,7 @@ impl AuditTarget for KafkaAuditTarget {
|
|||||||
/// to multiple targets
|
/// to multiple targets
|
||||||
/// # Example
|
/// # Example
|
||||||
/// ```
|
/// ```
|
||||||
/// use rustfs_logging::{AuditEntry, AuditLogger, FileAuditTarget};
|
/// use rustfs_obs::{AuditEntry, AuditLogger, FileAuditTarget};
|
||||||
/// let logger = AuditLogger::new(vec![Box::new(FileAuditTarget)]);
|
/// let logger = AuditLogger::new(vec![Box::new(FileAuditTarget)]);
|
||||||
/// ```
|
/// ```
|
||||||
/// # Note
|
/// # Note
|
||||||
@@ -247,7 +247,7 @@ impl AuditTarget for KafkaAuditTarget {
|
|||||||
/// ```toml
|
/// ```toml
|
||||||
/// [dependencies]
|
/// [dependencies]
|
||||||
/// tokio = { version = "1", features = ["full"] }
|
/// tokio = { version = "1", features = ["full"] }
|
||||||
/// rustfs_logging = { version = "0.1.0"}
|
/// rustfs_obs = { version = "0.1.0"}
|
||||||
/// ```
|
/// ```
|
||||||
/// # Note
|
/// # Note
|
||||||
/// This feature requires the `serde` crate
|
/// This feature requires the `serde` crate
|
||||||
@@ -255,7 +255,7 @@ impl AuditTarget for KafkaAuditTarget {
|
|||||||
/// ```toml
|
/// ```toml
|
||||||
/// [dependencies]
|
/// [dependencies]
|
||||||
/// serde = { version = "1", features = ["derive"] }
|
/// serde = { version = "1", features = ["derive"] }
|
||||||
/// rustfs_logging = { version = "0.1.0"}
|
/// rustfs_obs = { version = "0.1.0"}
|
||||||
/// ```
|
/// ```
|
||||||
pub struct AuditLogger {
|
pub struct AuditLogger {
|
||||||
tx: mpsc::Sender<AuditEntry>,
|
tx: mpsc::Sender<AuditEntry>,
|
||||||
@@ -270,7 +270,7 @@ impl AuditLogger {
|
|||||||
/// * An AuditLogger
|
/// * An AuditLogger
|
||||||
/// # Example
|
/// # Example
|
||||||
/// ```
|
/// ```
|
||||||
/// use rustfs_logging::{AuditLogger, AuditEntry, FileAuditTarget};
|
/// use rustfs_obs::{AuditLogger, AuditEntry, FileAuditTarget};
|
||||||
///
|
///
|
||||||
/// let logger = AuditLogger::new(vec![Box::new(FileAuditTarget)]);
|
/// let logger = AuditLogger::new(vec![Box::new(FileAuditTarget)]);
|
||||||
/// ```
|
/// ```
|
||||||
@@ -291,7 +291,7 @@ impl AuditLogger {
|
|||||||
/// * `entry` - The audit entry to log
|
/// * `entry` - The audit entry to log
|
||||||
/// # Example
|
/// # Example
|
||||||
/// ```
|
/// ```
|
||||||
/// use rustfs_logging::{AuditEntry, AuditLogger, FileAuditTarget};
|
/// use rustfs_obs::{AuditEntry, AuditLogger, FileAuditTarget};
|
||||||
///
|
///
|
||||||
/// #[tokio::main]
|
/// #[tokio::main]
|
||||||
/// async fn main() {
|
/// async fn main() {
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
///
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
/// ```
|
/// ```
|
||||||
/// use rustfs_logging::{log_info, log_error};
|
/// use rustfs_obs::{log_info, log_error};
|
||||||
///
|
///
|
||||||
/// log_info("This is an informational message");
|
/// log_info("This is an informational message");
|
||||||
/// log_error("This is an error message");
|
/// log_error("This is an error message");
|
||||||
@@ -24,7 +24,7 @@ mod telemetry;
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use crate::{log_info, AuditEntry, AuditLogger, AuditTarget, FileAuditTarget, Telemetry};
|
||||||
use chrono::Utc;
|
use chrono::Utc;
|
||||||
use opentelemetry::global;
|
use opentelemetry::global;
|
||||||
use opentelemetry::trace::{TraceContextExt, Tracer};
|
use opentelemetry::trace::{TraceContextExt, Tracer};
|
||||||
@@ -7,7 +7,7 @@ use tracing::{debug, error, info};
|
|||||||
///
|
///
|
||||||
/// # Example
|
/// # Example
|
||||||
/// ```
|
/// ```
|
||||||
/// use rustfs_logging::log_info;
|
/// use rustfs_obs::log_info;
|
||||||
///
|
///
|
||||||
/// log_info("This is an info message");
|
/// log_info("This is an info message");
|
||||||
/// ```
|
/// ```
|
||||||
@@ -22,7 +22,7 @@ pub fn log_info(msg: &str) {
|
|||||||
///
|
///
|
||||||
/// # Example
|
/// # Example
|
||||||
/// ```
|
/// ```
|
||||||
/// use rustfs_logging::log_error;
|
/// use rustfs_obs::log_error;
|
||||||
///
|
///
|
||||||
/// log_error("This is an error message");
|
/// log_error("This is an error message");
|
||||||
/// ```
|
/// ```
|
||||||
@@ -37,7 +37,7 @@ pub fn log_error(msg: &str) {
|
|||||||
///
|
///
|
||||||
/// # Example
|
/// # Example
|
||||||
/// ```
|
/// ```
|
||||||
/// use rustfs_logging::log_debug;
|
/// use rustfs_obs::log_debug;
|
||||||
///
|
///
|
||||||
/// log_debug("This is a debug message");
|
/// log_debug("This is a debug message");
|
||||||
/// ```
|
/// ```
|
||||||
@@ -25,7 +25,7 @@ use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt, EnvFilte
|
|||||||
///
|
///
|
||||||
/// # Example
|
/// # Example
|
||||||
/// ```
|
/// ```
|
||||||
/// use rustfs_logging::Telemetry;
|
/// use rustfs_obs::Telemetry;
|
||||||
///
|
///
|
||||||
/// let _telemetry = Telemetry::init();
|
/// let _telemetry = Telemetry::init();
|
||||||
/// ```
|
/// ```
|
||||||
@@ -76,6 +76,7 @@ mime_guess = "2.0.5"
|
|||||||
rust-embed = { workspace = true, features = ["interpolate-folder-path"] }
|
rust-embed = { workspace = true, features = ["interpolate-folder-path"] }
|
||||||
local-ip-address = { workspace = true }
|
local-ip-address = { workspace = true }
|
||||||
chrono = { workspace = true }
|
chrono = { workspace = true }
|
||||||
|
rustfs-obs = { workspace = true }
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
prost-build.workspace = true
|
prost-build.workspace = true
|
||||||
|
|||||||
Reference in New Issue
Block a user