Skip to content

Commit b691382

Browse files
committed
[v2][log]: Add generic fern::Dispatch TargetKind to log
1 parent c013fa5 commit b691382

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

plugins/log/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,10 @@ pub enum TargetKind {
181181
///
182182
/// This requires the webview to subscribe to log events, via this plugins `attachConsole` function.
183183
Webview,
184+
/// Send logs to a fern::Dispatch
185+
///
186+
/// You can use this to construct arbitrary log targets.
187+
Dispatch(fern::Dispatch),
184188
}
185189

186190
/// A log target.
@@ -478,6 +482,7 @@ impl Builder {
478482
});
479483
})
480484
}
485+
TargetKind::Dispatch(dispatch) => dispatch.into(),
481486
};
482487
target_dispatch = target_dispatch.chain(logger);
483488

0 commit comments

Comments
 (0)