mirror of
https://github.com/katanemo/plano.git
synced 2026-07-02 15:51:02 +02:00
fix logs
This commit is contained in:
parent
eb0f9e5d27
commit
b21ee93758
3 changed files with 8 additions and 8 deletions
|
|
@ -2,7 +2,7 @@
|
||||||
nodaemon=true
|
nodaemon=true
|
||||||
|
|
||||||
[program:brightstaff]
|
[program:brightstaff]
|
||||||
command=sh -c "RUST_LOG=debug /app/brightstaff 2>&1 | tee /var/log/brightstaff.log"
|
command=sh -c "RUST_LOG=info /app/brightstaff 2>&1 | tee /var/log/brightstaff.log"
|
||||||
stdout_logfile=/dev/stdout
|
stdout_logfile=/dev/stdout
|
||||||
redirect_stderr=true
|
redirect_stderr=true
|
||||||
stdout_logfile_maxbytes=0
|
stdout_logfile_maxbytes=0
|
||||||
|
|
|
||||||
|
|
@ -153,7 +153,7 @@ pub async fn chat(
|
||||||
Ok(route) => match route {
|
Ok(route) => match route {
|
||||||
Some((_, model_name)) => model_name,
|
Some((_, model_name)) => model_name,
|
||||||
None => {
|
None => {
|
||||||
debug!(
|
info!(
|
||||||
"No route determined, using default model from request: {}",
|
"No route determined, using default model from request: {}",
|
||||||
chat_completions_request_for_arch_router.model
|
chat_completions_request_for_arch_router.model
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -204,7 +204,7 @@ impl StreamContext {
|
||||||
// Tokenize and record token count.
|
// Tokenize and record token count.
|
||||||
let token_count = tokenizer::token_count(model, json_string).unwrap_or(0);
|
let token_count = tokenizer::token_count(model, json_string).unwrap_or(0);
|
||||||
|
|
||||||
info!(
|
debug!(
|
||||||
"[ARCHGW_REQ_ID:{}] TOKEN_COUNT: model='{}' input_tokens={}",
|
"[ARCHGW_REQ_ID:{}] TOKEN_COUNT: model='{}' input_tokens={}",
|
||||||
self.request_identifier(),
|
self.request_identifier(),
|
||||||
model,
|
model,
|
||||||
|
|
@ -492,7 +492,7 @@ impl StreamContext {
|
||||||
body: &[u8],
|
body: &[u8],
|
||||||
provider_id: ProviderId,
|
provider_id: ProviderId,
|
||||||
) -> Result<Vec<u8>, Action> {
|
) -> Result<Vec<u8>, Action> {
|
||||||
info!(
|
debug!(
|
||||||
"[ARCHGW_REQ_ID:{}] NON_STREAMING_PROCESS: provider_id={:?} body_size={}",
|
"[ARCHGW_REQ_ID:{}] NON_STREAMING_PROCESS: provider_id={:?} body_size={}",
|
||||||
self.request_identifier(),
|
self.request_identifier(),
|
||||||
provider_id,
|
provider_id,
|
||||||
|
|
@ -531,7 +531,7 @@ impl StreamContext {
|
||||||
if let Some((prompt_tokens, completion_tokens, total_tokens)) =
|
if let Some((prompt_tokens, completion_tokens, total_tokens)) =
|
||||||
response.extract_usage_counts()
|
response.extract_usage_counts()
|
||||||
{
|
{
|
||||||
info!(
|
debug!(
|
||||||
"[ARCHGW_REQ_ID:{}] RESPONSE_USAGE: prompt_tokens={} completion_tokens={} total_tokens={}",
|
"[ARCHGW_REQ_ID:{}] RESPONSE_USAGE: prompt_tokens={} completion_tokens={} total_tokens={}",
|
||||||
self.request_identifier(),
|
self.request_identifier(),
|
||||||
prompt_tokens,
|
prompt_tokens,
|
||||||
|
|
@ -697,7 +697,7 @@ impl HttpContext for StreamContext {
|
||||||
//We need to deserialize the request body based on the resolved API
|
//We need to deserialize the request body based on the resolved API
|
||||||
let mut deserialized_client_request: ProviderRequestType = match self.client_api.as_ref() {
|
let mut deserialized_client_request: ProviderRequestType = match self.client_api.as_ref() {
|
||||||
Some(the_client_api) => {
|
Some(the_client_api) => {
|
||||||
info!(
|
debug!(
|
||||||
"[ARCHGW_REQ_ID:{}] CLIENT_REQUEST_RECEIVED: api={:?} body_size={}",
|
"[ARCHGW_REQ_ID:{}] CLIENT_REQUEST_RECEIVED: api={:?} body_size={}",
|
||||||
self.request_identifier(),
|
self.request_identifier(),
|
||||||
the_client_api,
|
the_client_api,
|
||||||
|
|
@ -785,7 +785,7 @@ impl HttpContext for StreamContext {
|
||||||
// Extract user message for tracing
|
// Extract user message for tracing
|
||||||
self.user_message = deserialized_client_request.get_recent_user_message();
|
self.user_message = deserialized_client_request.get_recent_user_message();
|
||||||
|
|
||||||
info!(
|
debug!(
|
||||||
"[ARCHGW_REQ_ID:{}] MODEL_RESOLUTION: req_model='{}' -> resolved_model='{}' provider='{}' streaming={}",
|
"[ARCHGW_REQ_ID:{}] MODEL_RESOLUTION: req_model='{}' -> resolved_model='{}' provider='{}' streaming={}",
|
||||||
self.request_identifier(),
|
self.request_identifier(),
|
||||||
model_requested,
|
model_requested,
|
||||||
|
|
@ -871,7 +871,7 @@ impl HttpContext for StreamContext {
|
||||||
if let Ok(status_code) = status_str.parse::<u16>() {
|
if let Ok(status_code) = status_str.parse::<u16>() {
|
||||||
self.upstream_status_code = StatusCode::from_u16(status_code).ok();
|
self.upstream_status_code = StatusCode::from_u16(status_code).ok();
|
||||||
|
|
||||||
info!(
|
debug!(
|
||||||
"[ARCHGW_REQ_ID:{}] UPSTREAM_RESPONSE_STATUS: {}",
|
"[ARCHGW_REQ_ID:{}] UPSTREAM_RESPONSE_STATUS: {}",
|
||||||
self.request_identifier(),
|
self.request_identifier(),
|
||||||
status_code
|
status_code
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue