diff options
| author | troido <troido@protonmail.com> | 2020-09-26 15:06:12 +0200 |
|---|---|---|
| committer | troido <troido@protonmail.com> | 2020-09-26 15:06:12 +0200 |
| commit | 5a965b1dd369985698104c7cf99e6a0d10e0ec05 (patch) | |
| tree | 67746d9a7c97b07545a8b7b3389e9b25a2d5b554 /src/gameserver.rs | |
| parent | 9e69a2d3004e83a74cb876ae6c6fbdfb6ed167fb (diff) | |
include timestamps in logs
Diffstat (limited to 'src/gameserver.rs')
| -rw-r--r-- | src/gameserver.rs | 3 |
1 files changed, 2 insertions, 1 deletions
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, ""])); } |
