|
2 | 2 | <Configuration status="INFO">
|
3 | 3 | <Properties>
|
4 | 4 | <!-- Set the LOG_SCRUB_PATTERN env var to a regex pattern to scrub the log messages of secrets or any other unwanted content. -->
|
5 |
| - <Property name="default-pattern">%d{yyyy-MM-dd HH:mm:ss}{GMT+0} %highlight{%p} %C{1.}(%M):%L - %replace{%m}{$${env:LOG_SCRUB_PATTERN:-\*\*\*\*\*}}{*****}%n</Property> |
| 5 | + <Property name="jvm-log-pattern">%d{yyyy-MM-dd'T'HH:mm:ss,SSS}{GMT+0}`%highlight{%p}`%C{1.}(%M):%L - %replace{%m}{$${env:LOG_SCRUB_PATTERN:-\*\*\*\*\*}}{*****}%n</Property> |
6 | 6 | <!--Logs the timestamp and log_source/application name in the beginning of the line if it exists with a > separator, and then always the rest of the line.-->
|
7 |
| - <Property name="simple-pattern">%d{yyyy-MM-dd HH:mm:ss}{GMT+0}%replace{ %X{log_source}}{^ -}{} > %replace{%m}{$${env:LOG_SCRUB_PATTERN:-\*\*\*\*\*}}{*****}%n</Property> |
| 7 | + <Property name="container-log-pattern">%d{yyyy-MM-dd'T'HH:mm:ss,SSS}{GMT+0}`%replace{ %X{log_source}}{^ -}{} > %replace{%m}{$${env:LOG_SCRUB_PATTERN:-\*\*\*\*\*}}{*****}%n</Property> |
8 | 8 | <!-- Always log INFO by default. -->
|
9 | 9 | <Property name="log-level">${sys:LOG_LEVEL:-${env:LOG_LEVEL:-INFO}}</Property>
|
| 10 | + <Property name="logSubDir">${env:AIRBYTE_LOG_SUBDIR:-${date:yyyy-MM-dd'T'HH:mm:ss}}</Property> |
| 11 | + <Property name="logDir">build/test-logs/${logSubDir}</Property> |
10 | 12 | </Properties>
|
11 | 13 |
|
12 | 14 | <Appenders>
|
13 |
| - <Console name="Default" target="SYSTEM_OUT"> |
| 15 | + <Console name="JvmLogsStdOut" target="SYSTEM_OUT"> |
14 | 16 | <ContextMapFilter onMatch="DENY" onMismatch="ACCEPT">
|
15 | 17 | <KeyValuePair key="simple" value="true"/>
|
16 | 18 | </ContextMapFilter>
|
17 |
| - <PatternLayout pattern="${default-pattern}"/> |
| 19 | + <PatternLayout pattern="${jvm-log-pattern}"/> |
18 | 20 | </Console>
|
19 | 21 |
|
20 |
| - <Console name="SimpleDefault" target="SYSTEM_OUT"> |
| 22 | + <Console name="ContainerLogsStdOut" target="SYSTEM_OUT"> |
21 | 23 | <ContextMapFilter onMatch="ACCEPT" onMismatch="DENY">
|
22 | 24 | <KeyValuePair key="simple" value="true"/>
|
23 | 25 | </ContextMapFilter>
|
24 |
| - <PatternLayout pattern="${simple-pattern}"/> |
| 26 | + <PatternLayout pattern="${container-log-pattern}"/> |
25 | 27 | </Console>
|
| 28 | + |
| 29 | + <File name="JvmLogsFile" fileName="${logDir}/airbyte_jvm.log"> |
| 30 | + <ContextMapFilter onMatch="DENY" onMismatch="ACCEPT"> |
| 31 | + <KeyValuePair key="simple" value="true"/> |
| 32 | + </ContextMapFilter> |
| 33 | + <PatternLayout pattern="${jvm-log-pattern}"/> |
| 34 | + </File> |
| 35 | + <File name="ContainerLogFiles" fileName="${logDir}/airbyte_containers.log"> |
| 36 | + <ContextMapFilter onMatch="ACCEPT" onMismatch="DENY"> |
| 37 | + <KeyValuePair key="simple" value="true"/> |
| 38 | + </ContextMapFilter> |
| 39 | + <PatternLayout pattern="${container-log-pattern}"/> |
| 40 | + </File> |
| 41 | + <File name="UnifiedFile-JvmLogs" fileName="${logDir}/airbyte_unified.log"> |
| 42 | + <ContextMapFilter onMatch="DENY" onMismatch="ACCEPT"> |
| 43 | + <KeyValuePair key="simple" value="true"/> |
| 44 | + </ContextMapFilter> |
| 45 | + <PatternLayout pattern="${jvm-log-pattern}"/> |
| 46 | + </File> |
| 47 | + <File name="UnifiedFile-ContainerLogs" fileName="${logDir}/airbyte_unified.log"> |
| 48 | + <ContextMapFilter onMatch="ACCEPT" onMismatch="DENY"> |
| 49 | + <KeyValuePair key="simple" value="true"/> |
| 50 | + </ContextMapFilter> |
| 51 | + <PatternLayout pattern="${container-log-pattern}"/> |
| 52 | + </File> |
26 | 53 | </Appenders>
|
27 | 54 |
|
28 | 55 | <Loggers>
|
29 | 56 | <Root level="${log-level}">
|
30 |
| - <AppenderRef ref="Default"/> |
31 |
| - <AppenderRef ref="SimpleDefault"/> |
| 57 | + <AppenderRef ref="JvmLogsStdOut"/> |
| 58 | + <AppenderRef ref="ContainerLogsStdOut"/> |
| 59 | + <AppenderRef ref="JvmLogsFile"/> |
| 60 | + <AppenderRef ref="ContainerLogFiles"/> |
| 61 | + <AppenderRef ref="UnifiedFile-JvmLogs"/> |
| 62 | + <AppenderRef ref="UnifiedFile-ContainerLogs"/> |
32 | 63 | </Root>
|
33 | 64 |
|
34 | 65 | <Logger name="org.eclipse.jetty" level="INFO" />
|
|
0 commit comments