-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This sidesteps issues users are having when using local times in conditions where the `time` crate cannot safely get the local time. Thanks to @uggla and @rye. #44 #43
- Loading branch information
1 parent
88af897
commit d335c17
Showing
4 changed files
with
94 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "simple_logger" | ||
version = "1.15.1" | ||
version = "1.16.0" | ||
license = "MIT" | ||
authors = ["Sam Clements <[email protected]>"] | ||
description = "A logger that prints all messages with a readable output format" | ||
|
@@ -33,5 +33,9 @@ name = "threads" | |
required-features = ["threads"] | ||
|
||
[[example]] | ||
name = "timestamps" | ||
name = "timestamps_utc" | ||
required-features = ["timestamps"] | ||
|
||
[[example]] | ||
name = "timestamps_local" | ||
required-features = ["timestamps"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
use simple_logger::SimpleLogger; | ||
|
||
fn main() { | ||
SimpleLogger::new().with_timestamps(true).init().unwrap(); | ||
SimpleLogger::new().with_utc_timestamps(true).init().unwrap(); | ||
|
||
log::warn!("This is an example message."); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
use simple_logger::SimpleLogger; | ||
|
||
fn main() { | ||
SimpleLogger::new().with_utc_timestamps(true).init().unwrap(); | ||
|
||
log::warn!("This is an example message."); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters