Skip to content

Commit

Permalink
Add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Yonggan committed Feb 18, 2024
1 parent 93274a1 commit 4105ff2
Show file tree
Hide file tree
Showing 3 changed files with 105 additions and 3 deletions.
105 changes: 102 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ edition = "2021"
actix-cors = "0.7.0"
actix-web = "4.4.1"
chrono = { version = "0.4.33", features = ["serde"] }
env_logger = "0.11.2"
iso8601 = "0.6.1"
serde = { version = "1.0.196", features = ["derive"] }
serde_json = "1"
Expand Down
2 changes: 2 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use actix_web::{
};
use chrono::Duration;
use chrono::{DateTime, Local, NaiveDate, NaiveDateTime, NaiveTime, TimeZone, Utc};
use env_logger::Env;
use serde::Deserialize;
use serde::Serialize;
use std::clone::Clone;
Expand Down Expand Up @@ -160,6 +161,7 @@ async fn main() -> std::io::Result<()> {
presence: Mutex::new(HashMap::new()),
coming: Mutex::new(HashMap::new()),
});
env_logger::init_from_env(Env::default().default_filter_or("info"));
HttpServer::new(move || {
let cors = Cors::default()
.supports_credentials()
Expand Down

0 comments on commit 4105ff2

Please sign in to comment.