<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="warn" packages="net.consensys.linea.logging">
  <Appenders>
    <Console name="console" target="SYSTEM_OUT" immediateFlush="true">
      <PatternLayout pattern="[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{20} - %msg%n"/>
    </Console>
    <List name="ListAppender"/>
    <Rewrite name="rewrite">
      <AppenderRef ref="ListAppender"/>
      <AppenderRef ref="console"/>
      <Log4jLineaRewriter>
        <KnownErrors>
          <KnownError logLevel="WARN" message="^.*?\bA known error\b.*?$"/>
          <KnownError logLevel="WARN" message="^.*?\bUnsuppressed stack trace error\b.*?$" stackTrace="true"/>
          <KnownError logLevel="INFO" message="^.*?\beth_call\b.*?\bContract Call has been reverted by the EVM with the reason\b.*?$"/>
        </KnownErrors>
      </Log4jLineaRewriter>
    </Rewrite>
  </Appenders>
  <Loggers>
    <Logger name="net.consensys.linea.logging" level="debug" additivity="false">
      <DebouncingFilter/>
      <appender-ref ref="rewrite"/>
    </Logger>
    <Root level="debug">
      <AppenderRef ref="rewrite"/>
    </Root>
  </Loggers>
</Configuration>
