Add log and env_logger

Relates #7
This commit is contained in:
tgotwig 2019-09-14 14:08:27 +02:00
parent 2913c64da3
commit 87007c7e32
4 changed files with 7 additions and 1 deletions

2
.gitignore vendored
View file

@ -1,3 +1,3 @@
/target
**/*.rs.bk
Cargo.lock
Cargo.lock

View file

@ -20,6 +20,7 @@ features = ["winit"]
[dependencies]
stretch = "0.2"
twox-hash = "1.5"
log = "0.4.8"
# Enable to obtain conversion traits
winit = { version = "0.20.0-alpha3", optional = true }
@ -28,3 +29,4 @@ winit = { version = "0.20.0-alpha3", optional = true }
# A personal `ggez` fork that introduces a `FontCache` type to measure text
# efficiently and fixes HiDPI issues.
ggez = { version = "0.5", git = "https://github.com/hecrj/ggez.git" }
env_logger = "0.6.2"

View file

@ -12,6 +12,8 @@ use ggez::filesystem;
use ggez::graphics;
use ggez::input::mouse;
extern crate env_logger;
pub fn main() -> ggez::GameResult {
let (context, event_loop) = {
&mut ggez::ContextBuilder::new("iced", "ggez")
@ -33,6 +35,7 @@ pub fn main() -> ggez::GameResult {
true,
);
env_logger::init();
let state = &mut Game::new(context)?;
event::run(context, event_loop, state)

View file

@ -196,6 +196,7 @@
#![deny(unused_results)]
#![deny(unsafe_code)]
#![deny(rust_2018_idioms)]
#[macro_use] extern crate log;
pub mod input;
pub mod renderer;
pub mod widget;