mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: search launch review (#5169)
* fix: support filtering results by workspace * feat: add search button to sidebar * fix: reduce view/recent view fetching across application * feat: add channel to search listener * feat: clean + localization * chore: remove redundant code * fix: disable search * chore: trigger ci * chore: disable search in backend * test: disable search tests for now * feat: temp disable reliance on folder search * fix: add debounce to inline actions * chore: complete future if disposed * fix: clean code * chore: disable unused bloc with feature flag * fix: recent views lazy read * chore: revert podilfe change * chore: update logs * chore: update client api and collab * chore: fix tst * chore: fix test & update collab commit * chore: update collab commit * test: fix unit tests * chore: update rust toolchain 1.77 * chore: use opt-level 1 * fix: code review * chore: clippy --------- Co-authored-by: nathan <nathan@appflowy.io> Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
use std::io;
|
||||
use std::io::Write;
|
||||
use std::sync::{Arc, RwLock};
|
||||
|
||||
use chrono::Local;
|
||||
@ -88,8 +90,8 @@ impl Builder {
|
||||
.pretty()
|
||||
.with_env_filter(env_filter)
|
||||
.finish()
|
||||
.with(FlowyFormattingLayer::new(StdoutWriter))
|
||||
.with(JsonStorageLayer)
|
||||
.with(FlowyFormattingLayer::new(DebugStdoutWriter))
|
||||
.with(file_layer);
|
||||
set_global_default(subscriber).map_err(|e| format!("{:?}", e))?;
|
||||
};
|
||||
@ -106,12 +108,19 @@ impl tracing_subscriber::fmt::time::FormatTime for CustomTime {
|
||||
}
|
||||
}
|
||||
|
||||
pub struct StdoutWriter;
|
||||
pub struct DebugStdoutWriter;
|
||||
|
||||
impl<'a> MakeWriter<'a> for StdoutWriter {
|
||||
type Writer = std::io::Stdout;
|
||||
impl<'a> MakeWriter<'a> for DebugStdoutWriter {
|
||||
type Writer = Box<dyn Write>;
|
||||
|
||||
fn make_writer(&'a self) -> Self::Writer {
|
||||
std::io::stdout()
|
||||
#[cfg(not(debug_assertions))]
|
||||
{
|
||||
Box::new(io::sink())
|
||||
}
|
||||
#[cfg(debug_assertions)]
|
||||
{
|
||||
Box::new(io::stdout())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user