Skip to content

Commit

Permalink
fix: Don't set severity level for text log.
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyunnnn committed Jul 22, 2024
1 parent 5c3dd96 commit 6c52abf
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 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
2 changes: 1 addition & 1 deletion test/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ describe('getModifiedData', () => {
const modifiedData = getModifiedData(sampleText, undefined, true);
const expectedOutput =
JSON.stringify(

Check failure on line 137 in test/logger.ts

View workflow job for this annotation

GitHub Actions / lint

Replace `⏎········Object.assign(JSON.parse(expectedTextOutput))⏎······` with `Object.assign(JSON.parse(expectedTextOutput))`
Object.assign(JSON.parse(expectedTextOutput), {severity: 'ERROR'})
Object.assign(JSON.parse(expectedTextOutput))
) + '\n';
assert.equal(modifiedData, expectedOutput);
});
Expand Down

0 comments on commit 6c52abf

Please sign in to comment.