mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: remove unused code & update log (#5194)
* chore: remove unused code & update log * chore: clippy * chore: log
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
use chrono::Local;
|
||||
use std::{fmt, io::Write};
|
||||
|
||||
use serde::ser::{SerializeMap, Serializer};
|
||||
@ -45,7 +46,7 @@ where
|
||||
) -> Result<(), std::io::Error> {
|
||||
map_serializer.serialize_entry(MESSAGE, &message)?;
|
||||
// map_serializer.serialize_entry(LEVEL, &format!("{}", level))?;
|
||||
// map_serializer.serialize_entry(TIME, &chrono::Utc::now().timestamp())?;
|
||||
map_serializer.serialize_entry(TIME, &Local::now().format("%Y-%m-%d %H:%M:%S").to_string())?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -114,12 +114,9 @@ impl<'a> MakeWriter<'a> for DebugStdoutWriter {
|
||||
type Writer = Box<dyn Write>;
|
||||
|
||||
fn make_writer(&'a self) -> Self::Writer {
|
||||
#[cfg(not(debug_assertions))]
|
||||
{
|
||||
if std::env::var("DISABLE_EVENT_LOG").unwrap_or("false".to_string()) == "true" {
|
||||
Box::new(io::sink())
|
||||
}
|
||||
#[cfg(debug_assertions)]
|
||||
{
|
||||
} else {
|
||||
Box::new(io::stdout())
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user