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},
|
sync::{broadcast, mpsc, Semaphore},
|
||||||
time::{self, Duration},
|
time::{self, Duration},
|
||||||
};
|
};
|
||||||
use tracing::error;
|
use tracing::{error, info};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
connection::ConnectionType,
|
connection::ConnectionType,
|
||||||
|
|
@ -179,6 +179,7 @@ impl Handler {
|
||||||
) -> crate::Result<()> {
|
) -> crate::Result<()> {
|
||||||
match frame {
|
match frame {
|
||||||
ClientFrames::Plate { plate, timestamp } => {
|
ClientFrames::Plate { plate, timestamp } => {
|
||||||
|
info!("Receive new plate: {plate} at {timestamp}");
|
||||||
issue_possible_ticket(
|
issue_possible_ticket(
|
||||||
&mut db,
|
&mut db,
|
||||||
Plate {
|
Plate {
|
||||||
|
|
@ -198,6 +199,7 @@ impl Handler {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ClientFrames::IAmCamera { road, mile, limit } => {
|
ClientFrames::IAmCamera { road, mile, limit } => {
|
||||||
|
info!("Receive new camera: {road} at {mile} with limit {limit}");
|
||||||
if self.connection_type.is_some() {
|
if self.connection_type.is_some() {
|
||||||
return Err("Already connected".into());
|
return Err("Already connected".into());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue