Skip to content

Commit

Permalink
up fastdate version
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuxiujia committed Oct 19, 2023
1 parent 6cac3c4 commit 96b884e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ members = [

[package]
name = "fast_log"
version = "1.6.7"
version = "1.6.8"
description = "Rust async log High-performance asynchronous logging"
readme = "Readme.md"
authors = ["ce <[email protected]>"]
Expand All @@ -24,7 +24,7 @@ mmap = ["memmap2"]
runtime_thread = []

[dependencies]
fastdate = "0.2"
fastdate = "0.3"
log = { version = "0.4", features = ["std"] }
crossbeam-utils = "0.8"
crossbeam = "0.8"
Expand Down
2 changes: 1 addition & 1 deletion example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ log = { version = "0.4", features = ["std"] }
crossbeam-channel = "0.5"
crossbeam-utils = "0.8"
crossbeam = "0.8"
fastdate = "0.2"
fastdate = "0.3"
# features=["lz4"] or add features=["zip","lz4"] if you need lz4 packer
fast_log = { path = "../", features = ["lz4","zip","gzip","mmap"]}
tokio = {version="1",features = ["rt-multi-thread","macros"]}
Expand Down
5 changes: 3 additions & 2 deletions src/formats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ impl RecordFormat for FastLogFormat {
Command::CommandRecord => {
let now = match self.time_type {
TimeType::Local => {
fastdate::DateTime::from(arg.now).add_sub_sec(fastdate::offset_sec() as i64)
fastdate::DateTime::from(arg.now).set_offset(fastdate::offset_sec())
}
TimeType::Utc => fastdate::DateTime::from(arg.now),
}.to_string();
}
.to_string();
if arg.level.to_level_filter() <= self.display_line_level {
arg.formated = format!(
"{:27} {} {}:{} {}\n",
Expand Down

0 comments on commit 96b884e

Please sign in to comment.