AsperforMias opened a new pull request, #3744:
URL: https://github.com/apache/dubbo-go/pull/3744

   ### Description
   Fixes #3721
   
   Add behavioral regression tests for trace-aware Zap and Logrus adapters so 
dynamic log-level changes and trace correlation stay covered.
   
   On the same logger instance the tests move `info → debug → warn` and assert 
captured output: debug is suppressed at info, becomes visible after switching 
to debug, and both info and debug are suppressed at warn. Ordinary and 
context-aware methods are exercised, including formatted calls.
   
   Invalid levels return false and leave the previous threshold unchanged. 
Context logs with a deterministic valid span include the exact `trace_id`, 
`span_id`, and `trace_flags`; a context without a valid span does not add those 
fields.
   
   Factory `instantiate` with trace integration enabled is covered for both 
drivers. Facade tests call `logger.SetLoggerLevel` on real adapters and restore 
the previous global logger afterwards. Tests are not parallelized where they 
touch shared facade state.
   
   No production code changes. Existing adapter behavior is correct.
   
   Verification:
   
   ```text
   go test -count=1 -race ./logger/ ./logger/core/zap/ ./logger/core/logrus/
   make fmt
   make test
   ```
   
   ### Checklist
   - [x] I confirm the target branch is `develop`
   - [x] I have run `make fmt` to format my code
   - [x] I have run `make test` to run local tests
   - [x] I have added tests that prove my fix is effective or that my feature 
works


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to