feat: reload UI (#2999)

* chore: reload folder

* chore: reload folder

* chore: init sync

* chore: update tables

* chore: update database

* chore: load row

* chore: update

* chore: reload row

* test: fit test

* chore: retry

* chore: support batch fetch

* chore: enable sync

* chore: sync switch

* chore: sync switch

* chore: migration user data

* chore: migrate data

* chore: migrate folder

* chore: save user email

* chore: refresh user profile

* chore: fix test

* chore: delete translation files

* test: clippy format
This commit is contained in:
Nathan.fooo
2023-07-14 13:37:13 +08:00
committed by GitHub
parent 5085ea115f
commit f9e7b5ffa4
170 changed files with 3380 additions and 1482 deletions

View File

@ -4,9 +4,12 @@ use lazy_static::lazy_static;
use log::LevelFilter;
use tracing::subscriber::set_global_default;
use tracing_appender::{non_blocking::WorkerGuard, rolling::RollingFileAppender};
use tracing_bunyan_formatter::JsonStorageLayer;
use tracing_log::LogTracer;
use tracing_subscriber::{layer::SubscriberExt, EnvFilter};
use crate::layer::FlowyFormattingLayer;
mod layer;
lazy_static! {
static ref LOG_GUARD: RwLock<Option<WorkerGuard>> = RwLock::new(None);
@ -39,7 +42,7 @@ impl Builder {
pub fn build(self) -> std::result::Result<(), String> {
let env_filter = EnvFilter::new(self.env_filter);
let (_non_blocking, guard) = tracing_appender::non_blocking(self.file_appender);
let (non_blocking, guard) = tracing_appender::non_blocking(self.file_appender);
let subscriber = tracing_subscriber::fmt()
.with_ansi(true)
.with_target(true)
@ -51,10 +54,10 @@ impl Builder {
.with_span_list(true)
.compact()
.finish()
.with(env_filter);
// .with(JsonStorageLayer)
// .with(FlowyFormattingLayer::new(std::io::stdout))
// .with(FlowyFormattingLayer::new(non_blocking));
.with(env_filter)
.with(JsonStorageLayer)
.with(FlowyFormattingLayer::new(std::io::stdout))
.with(FlowyFormattingLayer::new(non_blocking));
set_global_default(subscriber).map_err(|e| format!("{:?}", e))?;
LogTracer::builder()