Skip to content

Commit

Permalink
fix: Don't set severity level for text log. (#625)
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyunnnn authored Jul 22, 2024
1 parent 5c3dd96 commit 5bd82de
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
3 changes: 0 additions & 3 deletions src/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,6 @@ export function getModifiedData(
}
} else {
dataWithContext = getTextWithContext(processedData, currentContext);
if (stderr) {
dataWithContext[SEVERITY] = 'ERROR';
}
}

return JSON.stringify(dataWithContext) + '\n';
Expand Down
4 changes: 1 addition & 3 deletions test/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,7 @@ describe('getModifiedData', () => {
it('simple text with error', () => {
const modifiedData = getModifiedData(sampleText, undefined, true);
const expectedOutput =
JSON.stringify(
Object.assign(JSON.parse(expectedTextOutput), {severity: 'ERROR'})
) + '\n';
JSON.stringify(Object.assign(JSON.parse(expectedTextOutput))) + '\n';
assert.equal(modifiedData, expectedOutput);
});

Expand Down

0 comments on commit 5bd82de

Please sign in to comment.