diff --git a/airbyte-integrations/bases/base-java/build.gradle b/airbyte-integrations/bases/base-java/build.gradle index 69abe73589c3..f3a90f553338 100644 --- a/airbyte-integrations/bases/base-java/build.gradle +++ b/airbyte-integrations/bases/base-java/build.gradle @@ -25,4 +25,5 @@ dependencies { implementation files(project(':airbyte-integrations:bases:base').airbyteDocker.outputs) testImplementation 'commons-lang:commons-lang:2.6' + implementation group: 'org.apache.logging.log4j', name: 'log4j-layout-template-json', version: '2.17.2' } diff --git a/airbyte-integrations/bases/base-java/src/main/resources/AirbyteLogMessageTemplate.json b/airbyte-integrations/bases/base-java/src/main/resources/AirbyteLogMessageTemplate.json new file mode 100644 index 000000000000..95cb9aa986f3 --- /dev/null +++ b/airbyte-integrations/bases/base-java/src/main/resources/AirbyteLogMessageTemplate.json @@ -0,0 +1,13 @@ +{ + "type": "LOG", + "log": { + "level": { + "$resolver": "level", + "field": "name" + }, + "message": { + "$resolver": "message", + "stringified": true + } + } +} diff --git a/airbyte-integrations/bases/base-java/src/main/resources/log4j2.xml b/airbyte-integrations/bases/base-java/src/main/resources/log4j2.xml new file mode 100644 index 000000000000..81e76194de83 --- /dev/null +++ b/airbyte-integrations/bases/base-java/src/main/resources/log4j2.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/airbyte-integrations/connectors/source-postgres/src/main/java/io/airbyte/integrations/source/postgres/PostgresSource.java b/airbyte-integrations/connectors/source-postgres/src/main/java/io/airbyte/integrations/source/postgres/PostgresSource.java index 6e0f2dbd157f..5cbe4600bf8a 100644 --- a/airbyte-integrations/connectors/source-postgres/src/main/java/io/airbyte/integrations/source/postgres/PostgresSource.java +++ b/airbyte-integrations/connectors/source-postgres/src/main/java/io/airbyte/integrations/source/postgres/PostgresSource.java @@ -16,6 +16,7 @@ import com.fasterxml.jackson.databind.JsonNode; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableMap.Builder; import com.google.common.collect.Sets; import io.airbyte.commons.features.EnvVariableFeatureFlags; import io.airbyte.commons.features.FeatureFlags;