From 5a965b1dd369985698104c7cf99e6a0d10e0ec05 Mon Sep 17 00:00:00 2001 From: troido Date: Sat, 26 Sep 2020 15:06:12 +0200 Subject: include timestamps in logs --- src/gameserver.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/gameserver.rs') diff --git a/src/gameserver.rs b/src/gameserver.rs index ccb9e30..9ab27c8 100644 --- a/src/gameserver.rs +++ b/src/gameserver.rs @@ -6,6 +6,7 @@ use std::io; use serde_json::{Value, json}; use serde::{Deserialize}; use unicode_categories::UnicodeCategories; +use chrono::Utc; use crate::{ controls::{Control, Action}, @@ -102,7 +103,7 @@ impl GameServer { } pub fn broadcast_message(&mut self, text: &str){ - println!("m {}", text); + println!("m {} {}", text, Utc::now()); self.broadcast_json(json!(["message", text, ""])); } -- cgit