-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Print
error.stack
for pattern layout and error.message
, `error.st…
…ack` and `error.name` for json layout. (#13309)
- Loading branch information
Showing
6 changed files
with
53 additions
and
20 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
12 changes: 6 additions & 6 deletions
12
platform/logging/layouts/__tests__/__snapshots__/JsonLayout.test.ts.snap
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`\`format()\` correctly formats record. 1`] = `"{\\"timestamp\\":\\"2012-01-31T23:00:00.000Z\\",\\"message\\":\\"message-1\\",\\"context\\":\\"context-1\\",\\"error\\":\\"Some error message\\",\\"level\\":{\\"id\\":\\"fatal\\",\\"value\\":2}}"`; | ||
exports[`\`format()\` correctly formats record. 1`] = `"{\\"@timestamp\\":\\"2012-01-31T23:00:00.000Z\\",\\"level\\":\\"FATAL\\",\\"context\\":\\"context-1\\",\\"message\\":\\"message-1\\",\\"error\\":{\\"name\\":\\"Some error name\\",\\"stack\\":\\"Some error stack\\",\\"message\\":\\"Some error message\\"}}"`; | ||
|
||
exports[`\`format()\` correctly formats record. 2`] = `"{\\"timestamp\\":\\"2012-01-31T23:00:00.000Z\\",\\"message\\":\\"message-2\\",\\"context\\":\\"context-2\\",\\"level\\":{\\"id\\":\\"error\\",\\"value\\":3}}"`; | ||
exports[`\`format()\` correctly formats record. 2`] = `"{\\"@timestamp\\":\\"2012-01-31T23:00:00.000Z\\",\\"level\\":\\"ERROR\\",\\"context\\":\\"context-2\\",\\"message\\":\\"message-2\\"}"`; | ||
|
||
exports[`\`format()\` correctly formats record. 3`] = `"{\\"timestamp\\":\\"2012-01-31T23:00:00.000Z\\",\\"message\\":\\"message-3\\",\\"context\\":\\"context-3\\",\\"level\\":{\\"id\\":\\"warn\\",\\"value\\":4}}"`; | ||
exports[`\`format()\` correctly formats record. 3`] = `"{\\"@timestamp\\":\\"2012-01-31T23:00:00.000Z\\",\\"level\\":\\"WARN\\",\\"context\\":\\"context-3\\",\\"message\\":\\"message-3\\"}"`; | ||
|
||
exports[`\`format()\` correctly formats record. 4`] = `"{\\"timestamp\\":\\"2012-01-31T23:00:00.000Z\\",\\"message\\":\\"message-4\\",\\"context\\":\\"context-4\\",\\"level\\":{\\"id\\":\\"debug\\",\\"value\\":6}}"`; | ||
exports[`\`format()\` correctly formats record. 4`] = `"{\\"@timestamp\\":\\"2012-01-31T23:00:00.000Z\\",\\"level\\":\\"DEBUG\\",\\"context\\":\\"context-4\\",\\"message\\":\\"message-4\\"}"`; | ||
|
||
exports[`\`format()\` correctly formats record. 5`] = `"{\\"timestamp\\":\\"2012-01-31T23:00:00.000Z\\",\\"message\\":\\"message-5\\",\\"context\\":\\"context-5\\",\\"level\\":{\\"id\\":\\"info\\",\\"value\\":5}}"`; | ||
exports[`\`format()\` correctly formats record. 5`] = `"{\\"@timestamp\\":\\"2012-01-31T23:00:00.000Z\\",\\"level\\":\\"INFO\\",\\"context\\":\\"context-5\\",\\"message\\":\\"message-5\\"}"`; | ||
|
||
exports[`\`format()\` correctly formats record. 6`] = `"{\\"timestamp\\":\\"2012-01-31T23:00:00.000Z\\",\\"message\\":\\"message-6\\",\\"context\\":\\"context-6\\",\\"level\\":{\\"id\\":\\"trace\\",\\"value\\":7}}"`; | ||
exports[`\`format()\` correctly formats record. 6`] = `"{\\"@timestamp\\":\\"2012-01-31T23:00:00.000Z\\",\\"level\\":\\"TRACE\\",\\"context\\":\\"context-6\\",\\"message\\":\\"message-6\\"}"`; |
This file contains 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