mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
tests: more cloud test (#4204)
* test: add anon user test * chore: add to runner * test: fix * test: fix * test: add tests * chore: add test * chore: fix warn * chore: fix warn * fix: build * fix: test * chore: rename * chore: fix test * chore: fix test * chore: fix test * chore: disable test
This commit is contained in:
@ -6,7 +6,7 @@ use tracing::subscriber::set_global_default;
|
||||
use tracing_appender::{non_blocking::WorkerGuard, rolling::RollingFileAppender};
|
||||
use tracing_bunyan_formatter::JsonStorageLayer;
|
||||
use tracing_subscriber::fmt::format::Writer;
|
||||
use tracing_subscriber::{layer::SubscriberExt, EnvFilter};
|
||||
use tracing_subscriber::{fmt, layer::SubscriberExt, EnvFilter};
|
||||
|
||||
use crate::layer::FlowyFormattingLayer;
|
||||
|
||||
@ -37,22 +37,25 @@ impl Builder {
|
||||
self
|
||||
}
|
||||
|
||||
pub fn build(self) -> std::result::Result<(), String> {
|
||||
pub fn build(self) -> Result<(), String> {
|
||||
let env_filter = EnvFilter::new(self.env_filter);
|
||||
|
||||
let std_out_layer = fmt::layer().with_writer(std::io::stdout).pretty();
|
||||
let (non_blocking, guard) = tracing_appender::non_blocking(self.file_appender);
|
||||
let file_layer = FlowyFormattingLayer::new(non_blocking);
|
||||
|
||||
let subscriber = tracing_subscriber::fmt()
|
||||
.with_timer(CustomTime)
|
||||
.with_ansi(true)
|
||||
.with_target(false)
|
||||
.with_max_level(tracing::Level::TRACE)
|
||||
.with_thread_ids(false)
|
||||
.with_writer(std::io::stderr)
|
||||
.pretty()
|
||||
.with_env_filter(env_filter)
|
||||
.finish()
|
||||
.with(JsonStorageLayer)
|
||||
.with(FlowyFormattingLayer::new(non_blocking));
|
||||
.with(file_layer)
|
||||
.with(std_out_layer);
|
||||
|
||||
set_global_default(subscriber).map_err(|e| format!("{:?}", e))?;
|
||||
|
||||
|
Reference in New Issue
Block a user