feat: cleaner logging
- less clutter with unusable `span` info (on my personal preference)
- less errors logged when being scanned (ex.: after status response
don't log errors with ping packets, scanners usually close
the connection)
- implemented more detailed OpaqueError fields
- `tracing::Level`
- error `kind`
This commit is contained in:
parent
efe080a9e7
commit
ee7a05152e
4 changed files with 102 additions and 35 deletions
|
|
@ -99,17 +99,19 @@ impl MinecraftAPI<Server> for McApi {
|
|||
let dep_name = match self.cache.query_dep_addr(&addr, &port).await {
|
||||
Some(x) => x,
|
||||
None => {
|
||||
return Err(OpaqueError::create(&format!(
|
||||
"Failed to find deployment name by addr"
|
||||
)))
|
||||
return Err(OpaqueError::create_with_kind(
|
||||
"Failed to find deployment name by addr",
|
||||
"DepNameLookupFailed",
|
||||
))
|
||||
}
|
||||
};
|
||||
let srv_name = match self.cache.query_srv_addr(&addr, &port).await {
|
||||
Some(x) => x,
|
||||
None => {
|
||||
return Err(OpaqueError::create(&format!(
|
||||
"Failed to find service name by addr"
|
||||
)))
|
||||
return Err(OpaqueError::create_with_kind(
|
||||
"Failed to find service name by addr",
|
||||
"SrvNameLookupFailed",
|
||||
))
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue