-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Use LOG4J2 to wrap connectors logs to JSON format #15668
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
0df942e
Use LOG4J2 to wrap connectors logs to JSON format
yurii-bidiuk 177fa41
log connector's stack trace directly as a message
yurii-bidiuk 38a01e0
add stack_trace field to json template
yurii-bidiuk 1d06a8e
bump versions
yurii-bidiuk b680f7e
auto-bump connector version [ci skip]
octavia-squidington-iii 36019ed
auto-bump connector version [ci skip]
octavia-squidington-iii 8116b79
Merge branch 'bidiuk/659-wrap-logs-to-json' of https://github.com/air…
octavia-squidington-iii 8710a21
auto-bump connector version [ci skip]
octavia-squidington-iii 0ba14e9
Merge branch 'bidiuk/659-wrap-logs-to-json' of https://github.com/air…
octavia-squidington-iii 58e712e
auto-bump connector version [ci skip]
octavia-squidington-iii 50ba7c2
Merge branch 'bidiuk/659-wrap-logs-to-json' of https://github.com/air…
octavia-squidington-iii 3665357
auto-bump connector version [ci skip]
octavia-squidington-iii b52ccd5
Merge branch 'bidiuk/659-wrap-logs-to-json' of https://github.com/air…
octavia-squidington-iii bd62f37
auto-bump connector version [ci skip]
octavia-squidington-iii 072972c
Merge branch 'bidiuk/659-wrap-logs-to-json' of https://github.com/air…
octavia-squidington-iii f671628
auto-bump connector version [ci skip]
octavia-squidington-iii 79e8c44
Merge branch 'bidiuk/659-wrap-logs-to-json' of https://github.com/air…
octavia-squidington-iii b14d345
auto-bump connector version [ci skip]
octavia-squidington-iii d879c26
Merge branch 'bidiuk/659-wrap-logs-to-json' of https://github.com/air…
octavia-squidington-iii cf82af7
auto-bump connector version [ci skip]
octavia-squidington-iii 6b2ebe8
Merge branch 'bidiuk/659-wrap-logs-to-json' of https://github.com/air…
octavia-squidington-iii 3cb44a3
revert versions for destinations: postgres, mssql, mysql
yurii-bidiuk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
20 changes: 20 additions & 0 deletions
20
airbyte-integrations/bases/base-java/src/main/resources/AirbyteLogMessageTemplate.json
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"type": "LOG", | ||
"log": { | ||
"level": { | ||
"$resolver": "level", | ||
"field": "name" | ||
}, | ||
"message": { | ||
"$resolver": "message", | ||
"stringified": true | ||
}, | ||
"stack_trace": { | ||
"$resolver": "exception", | ||
"field": "stackTrace", | ||
"stackTrace": { | ||
"stringified": true | ||
} | ||
} | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
airbyte-integrations/bases/base-java/src/main/resources/log4j2.xml
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Configuration status="INFO"> | ||
|
||
<Appenders> | ||
<Console name="ConsoleJSONAppender" target="SYSTEM_OUT"> | ||
<JsonTemplateLayout eventTemplateUri="classpath:AirbyteLogMessageTemplate.json"/> | ||
</Console> | ||
</Appenders> | ||
<Loggers> | ||
<Root level="INFO" additivity="false"> | ||
<AppenderRef ref="ConsoleJSONAppender"/> | ||
</Root> | ||
</Loggers> | ||
</Configuration> |
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
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
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
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the documentation for JsonTemplateLayout it seems that it should be possible to log stack trace w/o requiring that we concatenate
logMessage
andExceptionUtils.getStackTrace(e)
: https://logging.apache.org/log4j/2.x/manual/json-template-layout.html