Skip to content

Commit ba1a58e

Browse files
committed
Log in local time zone
Taking advantage of a new feature in simplelog
1 parent ecfa093 commit ba1a58e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::{convert::TryFrom, error::Error, fs};
22

33
use log::{info, LevelFilter};
44
use num_traits::ToPrimitive;
5-
use simplelog::{Config, WriteLogger};
5+
use simplelog::{ConfigBuilder, WriteLogger};
66
use termion::{event::Key, input::TermRead};
77

88
use klondike_lib::{
@@ -17,7 +17,7 @@ static LOG_FILE: &str = "klondike.log";
1717
fn main() -> Result<(), Box<dyn Error>> {
1818
WriteLogger::init(
1919
LevelFilter::Debug,
20-
Config::default(),
20+
ConfigBuilder::new().set_time_to_local(true).build(),
2121
fs::File::create(LOG_FILE)?,
2222
)?;
2323
log_panics::init();

0 commit comments

Comments
 (0)