rdserver
: Slightly improve logging
This commit is contained in:
parent
9622d3e188
commit
257ed5475c
1 changed files with 3 additions and 2 deletions
|
@ -14,13 +14,14 @@ use acrate_rd::xrd::{ResourceDescriptorLinkXRD, ResourceDescriptorPropertyXRD, R
|
||||||
use crate::config;
|
use crate::config;
|
||||||
|
|
||||||
pub async fn healthcheck_handler() -> Result<StatusCode, StatusCode> {
|
pub async fn healthcheck_handler() -> Result<StatusCode, StatusCode> {
|
||||||
log::info!("Handling an healthcheck request!");
|
log::debug!("Handling an healthcheck request!");
|
||||||
|
|
||||||
log::trace!("Making sure the database is up...");
|
log::trace!("Making sure the database is up...");
|
||||||
let _conn = AsyncPgConnection::establish(config::ACRATE_WEBFINGER_DATABASE_URL())
|
let _conn = AsyncPgConnection::establish(config::ACRATE_WEBFINGER_DATABASE_URL())
|
||||||
.await
|
.await
|
||||||
.map_err(|_| StatusCode::BAD_GATEWAY)?;
|
.map_err(|_| StatusCode::BAD_GATEWAY)?;
|
||||||
|
|
||||||
|
log::trace!("Healthcheck successful! Everything's fine!");
|
||||||
Ok(StatusCode::NO_CONTENT)
|
Ok(StatusCode::NO_CONTENT)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,7 +39,7 @@ pub async fn webfinger_handler(
|
||||||
headers: HeaderMap,
|
headers: HeaderMap,
|
||||||
Extension(mj): Extension<Arc<minijinja::Environment<'static>>>,
|
Extension(mj): Extension<Arc<minijinja::Environment<'static>>>,
|
||||||
) -> Result<Response<String>, StatusCode> {
|
) -> Result<Response<String>, StatusCode> {
|
||||||
log::info!("Handling a WebFinger request!");
|
log::debug!("Handling a WebFinger request!");
|
||||||
|
|
||||||
let resource = resource.unwrap_or_else(|| "".to_string());
|
let resource = resource.unwrap_or_else(|| "".to_string());
|
||||||
log::debug!("Resource is: {resource:#?}");
|
log::debug!("Resource is: {resource:#?}");
|
||||||
|
|
Loading…
Reference in a new issue