Fix metrics http server error messages (#1946)

## Issue Addressed

- Resolves #1945

## Proposed Changes

- As per #1945, fix a log message from the metrics server that was falsely claiming to be from the api server.
- Ensure successful api request logs are published to debug, not trace. This is something I've wanted to do for a while.

## Additional Info

NA
This commit is contained in:
Paul Hauner 2020-11-22 03:39:13 +00:00
parent 48f73b21e6
commit 0b556c4405
2 changed files with 4 additions and 4 deletions

View File

@ -430,11 +430,11 @@ where
let exit = runtime_context.executor.exit();
let (listen_addr, server) = http_metrics::serve(ctx, exit)
.map_err(|e| format!("Unable to start HTTP API server: {:?}", e))?;
.map_err(|e| format!("Unable to start HTTP metrics server: {:?}", e))?;
runtime_context
.executor
.spawn_without_exit(async move { server.await }, "http-api");
.spawn_without_exit(async move { server.await }, "http-metrics");
Some(listen_addr)
} else {

View File

@ -26,7 +26,7 @@ use lighthouse_version::version_with_platform;
use network::NetworkMessage;
use parking_lot::Mutex;
use serde::{Deserialize, Serialize};
use slog::{crit, error, info, trace, warn, Logger};
use slog::{crit, debug, error, info, warn, Logger};
use slot_clock::SlotClock;
use ssz::Encode;
use state_id::StateId;
@ -116,7 +116,7 @@ pub fn slog_logging(
|| status == StatusCode::NOT_FOUND
|| status == StatusCode::PARTIAL_CONTENT =>
{
trace!(
debug!(
log,
"Processed HTTP API request";
"elapsed" => format!("{:?}", info.elapsed()),