start to adding logs
This commit is contained in:
@@ -3,6 +3,7 @@ use crate::server_conf::conexion::Conexion;
|
||||
use crate::server_conf::listener::GenericListener;
|
||||
use std::thread;
|
||||
use std::sync::{Arc, RwLock};
|
||||
use log::{error,info};
|
||||
|
||||
pub struct ConfSer{
|
||||
path: String,
|
||||
@@ -23,7 +24,7 @@ impl Drop for ConfSer {
|
||||
fn drop(&mut self) {
|
||||
// There's no way to return a useful error here
|
||||
let _ = std::fs::remove_file(self.path.clone()).unwrap();
|
||||
println!("> Dropping {}", self.path);
|
||||
info!("> Dropping {}", self.path);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +38,7 @@ pub fn start(conf: Arc<RwLock<conf::Config>>){
|
||||
let c = conf.clone();
|
||||
thread::spawn(|| Conexion::new(c, stream).process_reques());
|
||||
}
|
||||
Err(e) => println!("{}", e)
|
||||
Err(e) => error!("{}", e)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user