Skip to content

Commit c002483

Browse files
committed
Add a prefix to http server logs
1 parent ed24b6f commit c002483

File tree

5 files changed

+12
-9
lines changed

5 files changed

+12
-9
lines changed

mithril-aggregator/src/http_server/routes/certificate_routes.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ mod handlers {
4444
pub async fn certificate_pending(
4545
certificate_pending_store: Arc<CertificatePendingStore>,
4646
) -> Result<impl warp::Reply, Infallible> {
47-
debug!("certificate_pending");
47+
debug!("⇄ HTTP SERVER: certificate_pending");
4848

4949
match certificate_pending_store.get().await {
5050
Ok(Some(certificate_pending)) => Ok(reply::json(&certificate_pending, StatusCode::OK)),
@@ -61,7 +61,10 @@ mod handlers {
6161
certificate_hash: String,
6262
certificate_store: Arc<CertificateStore>,
6363
) -> Result<impl warp::Reply, Infallible> {
64-
debug!("certificate_certificate_hash/{}", certificate_hash);
64+
debug!(
65+
"⇄ HTTP SERVER: certificate_certificate_hash/{}",
66+
certificate_hash
67+
);
6568

6669
match certificate_store.get_from_hash(&certificate_hash).await {
6770
Ok(Some(certificate)) => Ok(reply::json(&certificate, StatusCode::OK)),

mithril-aggregator/src/http_server/routes/epoch_routes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ mod handlers {
3737
protocol_parameters_store: Arc<ProtocolParametersStore>,
3838
multi_signer: MultiSignerWrapper,
3939
) -> Result<impl warp::Reply, Infallible> {
40-
debug!("epoch_settings");
40+
debug!("⇄ HTTP SERVER: epoch_settings");
4141

4242
match multi_signer.read().await.get_current_beacon().await {
4343
Some(beacon) => match protocol_parameters_store

mithril-aggregator/src/http_server/routes/signatures_routes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ mod handlers {
3434
signature: entities::SingleSignatures,
3535
multi_signer: MultiSignerWrapper,
3636
) -> Result<impl warp::Reply, Infallible> {
37-
debug!("register_signatures/{:?}", signature);
37+
debug!("⇄ HTTP SERVER: register_signatures/{:?}", signature);
3838

3939
let mut multi_signer = multi_signer.write().await;
4040
match multi_signer.register_single_signature(&signature).await {

mithril-aggregator/src/http_server/routes/signer_routes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ mod handlers {
3535
signer: entities::Signer,
3636
multi_signer: MultiSignerWrapper,
3737
) -> Result<impl warp::Reply, Infallible> {
38-
debug!("register_signer/{:?}", signer);
38+
debug!("⇄ HTTP SERVER: register_signer/{:?}", signer);
3939

4040
let mut multi_signer = multi_signer.write().await;
4141
match key_decode_hex(&signer.verification_key) {

mithril-aggregator/src/http_server/routes/snapshot_routes.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ mod handlers {
6868
pub async fn snapshots(
6969
snapshot_store: Arc<dyn SnapshotStore>,
7070
) -> Result<impl warp::Reply, Infallible> {
71-
debug!("snapshots");
71+
debug!("⇄ HTTP SERVER: snapshots");
7272

7373
match snapshot_store.list_snapshots().await {
7474
Ok(snapshots) => Ok(reply::json(&snapshots, StatusCode::OK)),
@@ -86,7 +86,7 @@ mod handlers {
8686
) -> Result<impl warp::Reply, Infallible> {
8787
let filepath = reply.path().to_path_buf();
8888
debug!(
89-
"ensure_downloaded_file_is_a_snapshot / file: `{}`",
89+
"⇄ HTTP SERVER: ensure_downloaded_file_is_a_snapshot / file: `{}`",
9090
filepath.display()
9191
);
9292

@@ -115,7 +115,7 @@ mod handlers {
115115
config: Configuration,
116116
snapshot_store: Arc<dyn SnapshotStore>,
117117
) -> Result<impl warp::Reply, Infallible> {
118-
debug!("snapshot_download/{}", digest);
118+
debug!("⇄ HTTP SERVER: snapshot_download/{}", digest);
119119

120120
match snapshot_store.get_snapshot_details(digest).await {
121121
Ok(Some(snapshot)) => {
@@ -150,7 +150,7 @@ mod handlers {
150150
digest: String,
151151
snapshot_store: Arc<dyn SnapshotStore>,
152152
) -> Result<impl warp::Reply, Infallible> {
153-
debug!("snapshot_digest/{}", digest);
153+
debug!("⇄ HTTP SERVER: snapshot_digest/{}", digest);
154154

155155
match snapshot_store.get_snapshot_details(digest).await {
156156
Ok(snapshot) => match snapshot {

0 commit comments

Comments
 (0)