summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authormrw1593 <botahamec@outlook.com>2023-05-14 10:43:23 -0400
committermrw1593 <botahamec@outlook.com>2023-05-29 10:46:02 -0400
commitb66023131bd66fd50a307d12c571fc23bc3037dc (patch)
treec5f53611554b21a375db5148997f624ca6b74834 /src/main.rs
parentad6faa37ff59a01f6834e0c9141d84e24b81d509 (diff)
Added logging support
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index 4b8762d..de3585b 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,5 +1,8 @@
-use actix_web::{web::Data, App, HttpServer};
-use exun::RawUnexpected;
+use actix_web::middleware::Logger;
+use actix_web::web::Data;
+use actix_web::{App, HttpServer};
+
+use exun::*;
mod api;
mod models;
@@ -16,6 +19,7 @@ async fn main() -> Result<(), RawUnexpected> {
// start the server
HttpServer::new(move || {
App::new()
+ .wrap(Logger::new("[%t] \"%r\" %s %Dms"))
.app_data(Data::new(sql_pool.clone()))
.service(api::liveops())
.service(api::users())