Skip to content

[BUG]: debug and trace log message printed outside of the request scope #1205

@waldekmastykarz

Description

@waldekmastykarz

Description

debug- and trace-level log messages from plugins are printed outside of the request scope in the console.

Expected behaviour

 req   ╭ GET https://login.microsoftonline.com/foo/v2.0/.well-known/openid-configuration
 time  │ 5/22/2025 7:55:13 AM +00:00
 skip  │ LatencyPlugin: URL not matched
 skip  │ LatencyPlugin: URL not matched
 mock  │ EntraMockResponsePlugin: 200 https://login.microsoftonline.com/*/v2.0/.well-known/openid-configuration
 dbug  | [9:55:13 AM] OpenAITelemetryPlugin: Checking if the request is an OpenAI request...
 dbug  | [9:55:13 AM] OpenAITelemetryPlugin: Failed to deserialize OpenAI request
 skip  │ OpenAITelemetryPlugin: Request is not a POST request with a body
 skip  │ CrudApiPlugin: URL not matched
 skip  ╰ OpenAIMockResponsePlugin: Response already set

Actual behaviour

 req   ╭ GET https://login.microsoftonline.com/foo/v2.0/.well-known/openid-configuration
 time  │ 5/22/2025 7:55:13 AM +00:00
 skip  │ LatencyPlugin: URL not matched
 skip  │ LatencyPlugin: URL not matched
 mock  │ EntraMockResponsePlugin: 200 https://login.microsoftonline.com/*/v2.0/.well-known/openid-configuration
 skip  │ OpenAITelemetryPlugin: Request is not a POST request with a body
 skip  │ CrudApiPlugin: URL not matched
 skip  ╰ OpenAIMockResponsePlugin: Response already set
 dbug    [9:55:13 AM] OpenAITelemetryPlugin: Checking if the request is an OpenAI request...
 dbug    [9:55:13 AM] OpenAITelemetryPlugin: Failed to deserialize OpenAI request

Steps to reproduce

Change log severity to debug or trace

Dev Proxy Version

Latest from main

Operating system (environment)

macOS

Shell

zsh

Configuration file

any

Additional Info

No response

Metadata

Metadata

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions