fix(logs-viewer): fail to search json logs [EE-4857] (#8482)
This commit is contained in:
@@ -119,15 +119,17 @@ export function formatKeyValuePair(
|
||||
) {
|
||||
let nl = line;
|
||||
|
||||
const strValue = typeof value !== 'string' ? JSON.stringify(value) : value;
|
||||
|
||||
spans.push(
|
||||
{ fgColor: Colors.Blue, text: `${key}=` },
|
||||
{
|
||||
fgColor: key === 'error' || key === 'ERR' ? Colors.Red : Colors.Magenta,
|
||||
text: value as string,
|
||||
text: strValue,
|
||||
}
|
||||
);
|
||||
if (!isLastKey) spans.push(spaceSpan);
|
||||
nl += `${key}=${value}${!isLastKey ? ' ' : ''}`;
|
||||
nl += `${key}=${strValue}${!isLastKey ? ' ' : ''}`;
|
||||
|
||||
return nl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user