Skip to content

fix: preserve debug log level priority in Logging::level()#1991

Open
jorgsowa wants to merge 2 commits into
open-telemetry:mainfrom
jorgsowa:fix/logging-debug-level-priority
Open

fix: preserve debug log level priority in Logging::level()#1991
jorgsowa wants to merge 2 commits into
open-telemetry:mainfrom
jorgsowa:fix/logging-debug-level-priority

Conversation

@jorgsowa

Copy link
Copy Markdown

array_search returns 0 for debug (first in the LEVELS array) and false when not found; the old ?: 1 collapsed both to 1 (info), silently ignoring debug-level messages. Use !== false to distinguish the two.

array_search returns 0 for debug (first in the LEVELS array) and false
when not found; the old ?: 1 collapsed both to 1 (info), silently
ignoring debug-level messages. Use !== false to distinguish the two.
@jorgsowa jorgsowa requested a review from a team as a code owner June 26, 2026 16:32
@linux-foundation-easycla

linux-foundation-easycla Bot commented Jun 26, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: jorgsowa / name: Jorg Sowa (f46ff1d)

@codecov

codecov Bot commented Jun 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 68.02%. Comparing base (6cb4156) to head (9c574db).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/API/Behavior/Internal/Logging.php 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #1991      +/-   ##
============================================
- Coverage     68.02%   68.02%   -0.01%     
- Complexity     3075     3076       +1     
============================================
  Files           459      459              
  Lines          9017     9020       +3     
============================================
+ Hits           6134     6136       +2     
- Misses         2883     2884       +1     
Flag Coverage Δ
8.1 67.73% <0.00%> (+0.01%) ⬆️
8.2 67.93% <0.00%> (+0.02%) ⬆️
8.3 67.92% <0.00%> (+<0.01%) ⬆️
8.4 67.94% <0.00%> (-0.05%) ⬇️
8.5 67.96% <0.00%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/API/Behavior/Internal/Logging.php 0.00% <0.00%> (ø)

... and 13 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6cb4156...9c574db. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ChrisLightfootWild

Copy link
Copy Markdown
Contributor

@jorgsowa thanks for this. Would you be able to take a look at the failing unit test please?

The debug data set relied on the pre-f46ff1d6 bug that collapsed
debug's priority to info. With the fix, debug is correctly below the
default info threshold, so set OTEL_LOG_LEVEL=debug to exercise all
levels.
@jorgsowa

jorgsowa commented Jul 1, 2026

Copy link
Copy Markdown
Author

@ChrisLightfootWild test adjusted.

@ChrisLightfootWild ChrisLightfootWild requested review from a team and removed request for a team July 1, 2026 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants