-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use LOG4J2 to wrap connectors logs to JSON format
- Loading branch information
1 parent
a3a6501
commit 1b57642
Showing
3 changed files
with
28 additions
and
0 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
13 changes: 13 additions & 0 deletions
13
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,13 @@ | ||
{ | ||
"type": "LOG", | ||
"log": { | ||
"level": { | ||
"$resolver": "level", | ||
"field": "name" | ||
}, | ||
"message": { | ||
"$resolver": "message", | ||
"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> |