Skip to content

New Log Details: Support multiple log details displayed #108327

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jul 21, 2025
Next Next commit
LogLine: optionally highlight search based on syntax highlighting state
  • Loading branch information
matyax committed Jul 21, 2025
commit 32092273ecbaa9393323c73d3f9223862cfd2290
5 changes: 4 additions & 1 deletion public/app/features/logs/components/panel/LogLine.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,9 @@ const LogLineBody = ({ log, styles }: { log: LogListModel; styles: LogLineStyles
const { matchingUids, search } = useLogListSearchContext();

const highlight = useMemo(() => {
if (!syntaxHighlighting) {
return undefined;
}
const searchWords = log.searchWords && log.searchWords[0] ? log.searchWords.slice() : [];
if (search && matchingUids?.includes(log.uid)) {
searchWords.push(search);
Expand All @@ -331,7 +334,7 @@ const LogLineBody = ({ log, styles }: { log: LogListModel; styles: LogLineStyles
return undefined;
}
return { searchWords, highlightClassName: styles.matchHighLight };
}, [log.searchWords, log.uid, matchingUids, search, styles.matchHighLight]);
}, [log.searchWords, log.uid, matchingUids, search, styles.matchHighLight, syntaxHighlighting]);

if (log.hasAnsi) {
return (
Expand Down