Logging
This commit is contained in:
parent
34c6343d63
commit
f62a6e804a
1 changed files with 3 additions and 1 deletions
|
|
@ -5,7 +5,7 @@ use tokio::{
|
|||
sync::{broadcast, mpsc, Semaphore},
|
||||
time::{self, Duration},
|
||||
};
|
||||
use tracing::error;
|
||||
use tracing::{error, info};
|
||||
|
||||
use crate::{
|
||||
connection::ConnectionType,
|
||||
|
|
@ -179,6 +179,7 @@ impl Handler {
|
|||
) -> crate::Result<()> {
|
||||
match frame {
|
||||
ClientFrames::Plate { plate, timestamp } => {
|
||||
info!("Receive new plate: {plate} at {timestamp}");
|
||||
issue_possible_ticket(
|
||||
&mut db,
|
||||
Plate {
|
||||
|
|
@ -198,6 +199,7 @@ impl Handler {
|
|||
}
|
||||
}
|
||||
ClientFrames::IAmCamera { road, mile, limit } => {
|
||||
info!("Receive new camera: {road} at {mile} with limit {limit}");
|
||||
if self.connection_type.is_some() {
|
||||
return Err("Already connected".into());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue