Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: move these to debug logs #524

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions trace-mini-agent/src/http_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ use hyper::{
http::{self, HeaderMap},
Body, Response, StatusCode,
};
use log::{error, info};
use log::{debug, error};
use serde_json::json;

/// Does two things:
/// 1. Logs the given message. A success status code (within 200-299) will cause an info log to be
/// 1. Logs the given message. A success status code (within 200-299) will cause a debug log to be
/// written,
/// otherwise error will be written.
/// 2. Returns the given message in the body of JSON response with the given status code.
Expand All @@ -24,7 +24,7 @@ pub fn log_and_create_http_response(
status: StatusCode,
) -> http::Result<Response<Body>> {
if status.is_success() {
info!("{message}");
debug!("{message}");
} else {
error!("{message}");
}
Expand Down
Loading