Add an HTTP API endpoint + UI widgets to stream logs (#49)
* Added JSON logs to Desktop * Move logging config into librqbit for reuse * Log printer now available in both Desktop and Web UI * Fix JS type error
This commit is contained in:
parent
9385524a1a
commit
2017c5ec94
21 changed files with 462 additions and 333 deletions
|
|
@ -19,7 +19,8 @@ use crate::{
|
|||
torrent_state::{
|
||||
peer::stats::snapshot::{PeerStatsFilter, PeerStatsSnapshot},
|
||||
ManagedTorrentHandle,
|
||||
}, log_subscriber::LineBroadcast,
|
||||
},
|
||||
tracing_subscriber_config_utils::LineBroadcast,
|
||||
};
|
||||
|
||||
pub use crate::torrent_state::stats::{LiveStats, TorrentStats};
|
||||
|
|
@ -39,12 +40,12 @@ impl Api {
|
|||
pub fn new(
|
||||
session: Arc<Session>,
|
||||
rust_log_reload_tx: Option<UnboundedSender<String>>,
|
||||
line_broadcast: Option<LineBroadcast>
|
||||
line_broadcast: Option<LineBroadcast>,
|
||||
) -> Self {
|
||||
Self {
|
||||
session,
|
||||
rust_log_reload_tx,
|
||||
line_broadcast
|
||||
line_broadcast,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue