mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-06-06 13:53:54 +02:00
[v2][log]: Add generic fern::Dispatch TargetKind to log (#2600)
* [v2][log]: Add generic fern::Dispatch TargetKind to log Original: https://github.com/tauri-apps/plugins-workspace/pull/1130/commits/b691382d1ea54733ca837995cfac9f82ea05f168 * Add change file * clippy --------- Co-authored-by: Tony <legendmastertony@gmail.com> Co-authored-by: venkr <venkateshrameshkumar+1@gmail.com>
This commit is contained in:
committed by
GitHub
parent
d1609913be
commit
9629c2f4f9
@@ -170,6 +170,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.
|
||||
@@ -481,6 +485,7 @@ impl Builder {
|
||||
});
|
||||
})
|
||||
}
|
||||
TargetKind::Dispatch(dispatch) => dispatch.into(),
|
||||
};
|
||||
target_dispatch = target_dispatch.chain(logger);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user