Skip to content
Closed
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
5 changes: 5 additions & 0 deletions plugins/log/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@ pub enum TargetKind {
///
/// This requires the webview to subscribe to log events, via this plugins `attachConsole` function.
Webview,
/// Send logs to a fern::Dispatch
///
/// You can use this to construct arbitrary log targets.
Dispatch(fern::Dispatch),
}

/// A log target.
Expand Down Expand Up @@ -478,6 +482,7 @@ impl Builder {
});
})
}
TargetKind::Dispatch(dispatch) => dispatch.into(),
};
target_dispatch = target_dispatch.chain(logger);

Expand Down