Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

2.7 KB
Raw Blame
<?xml version="1.0" encoding="UTF-8"?>
<Configuration>
  <Appenders>
    <Console name="Console" target="SYSTEM_OUT" follow="true">
      <PatternLayout pattern="[%t] %-5level %logger{36} - %msg %notEmpty{%X}%n"/>
      <Filters>
        <ThresholdFilter level="FATAL" onMatch="ACCEPT" onMismatch="DENY"/>
      </Filters>
    </Console>
    <!-- The shared Console only accepts FATAL, which is right for a suite this chatty. Warnings that mean a
         test silently broke its own isolation need to be seen, so they get an appender that accepts them. -->
    <Console name="WarnConsole" target="SYSTEM_OUT" follow="true">
      <PatternLayout pattern="[%t] %-5level %logger{36} - %msg %notEmpty{%X}%n"/>
      <Filters>
        <ThresholdFilter level="WARN" onMatch="ACCEPT" onMismatch="DENY"/>
      </Filters>
    </Console>
    <File name="File" fileName="logs/test-log.json" append="false">
      <JsonLayout locationInfo="false" properties="true" compact="true" eventEol="true"/>
      <Filters>
        <ThresholdFilter level="INFO" onMatch="ACCEPT" onMismatch="DENY"/>
      </Filters>
    </File>
  </Appenders>
  <Loggers>
    <Logger name="liquibase" level="INFO"/>
    <Logger name="metabase" level="INFO"/>
    <Logger name="metabase-enterprise" level="INFO"/>

    <!-- Eval-trace sink (metabase.ai-tracing): additivity=false with no appender keeps the JSONL
         spans out of the shared test log. Tests that assert on emitted spans attach their own
         appender via metabase.util.log.capture, so this does not hide them. Mirrors the prod
         resources/log4j2.xml, minus the per-session RoutingAppender (tests don't read the files). -->
    <Logger name="metabase.ai-tracing.log" level="info" additivity="false"/>

    <!-- A rollback-only scope that could not roll back leaves its rows behind for every later test, and the
         tests that trip over them fail somewhere else entirely. Say so where the run can be read. -->
    <Logger name="metabase.app-db.connection" level="INFO" additivity="false">
      <AppenderRef ref="WarnConsole"/>
      <AppenderRef ref="File"/>
    </Logger>

    <!-- Pivot parity check emits per-flow timing + failure cause at WARN so a Presto (or other driver) CI
         failure surfaces which flow was slow and what root exception hit each flow, without needing the
         JSON log file (which CI doesn't publish). Diagnostic; safe to drop once UA is stable. -->
    <Logger name="metabase.query-processor.pivot" level="WARN" additivity="false">
      <AppenderRef ref="WarnConsole"/>
      <AppenderRef ref="File"/>
    </Logger>

    <Root level="INFO">
      <AppenderRef ref="Console"/>
      <AppenderRef ref="File"/>
    </Root>
  </Loggers>
</Configuration>