fix: improve Apex log detection robustness#729
Merged
lcottercertinia merged 2 commits intocertinia:mainfrom Feb 12, 2026
Merged
fix: improve Apex log detection robustness#729lcottercertinia merged 2 commits intocertinia:mainfrom
lcottercertinia merged 2 commits intocertinia:mainfrom
Conversation
This will probably be the log levels line ut if not present will be placed on the first line with timestamp.
lcottercertinia
approved these changes
Feb 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 PR Overview
Improves Apex debug log detection to handle more real-world log formats — including logs with preamble text, missing API version prefixes, and logs that start with
USER_INFOorEXECUTION_STARTEDinstead of the settings header. Also places the log duration decoration on the first valid log line rather than always line 0.🛠️ Changes made
ApexLogLanguageDetectorto detect logs byEXECUTION_STARTEDandUSER_INFOlines, not just the settings headerAPEX_CODE,FINE;...without64.0prefix)isApexLogFile)firstLinefrompackage.jsonlanguage contribution (detection is now content-based)findFirstLogLinehelper inLogTimingDecorationto place duration ghost text on the actual first log lineAPEXLOG_HEADERregex for reuse across modulesisApexLogContentwith 7 test cases covering standard, preamble, headerless, and negative scenarios🧩 Type of change (check all applicable)
🔗 Related Issues
N/A
✅ Tests added?
ApexLogLanguageDetector.test.ts📚 Docs updated?