Skip to content

Commit

Permalink
EcContainer: increased a log level
Browse files Browse the repository at this point in the history
  • Loading branch information
vsuharnikov committed Nov 12, 2024
1 parent 825949c commit d825d9e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class EcContainer(network: NetworkImpl, number: Int, ip: String)(implicit httpCl
.withNetwork(network)
.withExposedPorts(RpcPort, EnginePort)
.withEnv("LOG4J_CONFIGURATION_FILE", "/config/log4j2.xml")
.withEnv("ROOT_LOG_FILE_LEVEL", "TRACE")
.withFileSystemBind(s"$ConfigsDir/ec-common/genesis.json", "/genesis.json", BindMode.READ_ONLY)
.withFileSystemBind(s"$ConfigsDir/besu", "/config", BindMode.READ_ONLY)
.withFileSystemBind(s"$ConfigsDir/besu/run-besu.sh", "/tmp/run.sh", BindMode.READ_ONLY)
Expand Down
24 changes: 13 additions & 11 deletions local-network/configs/besu/log4j2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,20 @@

<Properties>
<Property name="root.log.pattern">%date %-5level [%-25.25thread] %35.35c{1.} - %msg%n%throwable</Property>
<Property name="root.log.file.level">DEBUG</Property>
</Properties>

<!-- Example with JSON: https://github.com/Consensys/quorum-dev-quickstart/blob/b72a0f64d685c851bf8be399a8e33bbdf0e09982/files/besu/config/besu/log-config.xml -->
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout alwaysWriteExceptions="false" pattern='${root.log.pattern}'/>
<PatternLayout alwaysWriteExceptions="false" pattern="${root.log.pattern}"/>
</Console>
<RollingFile name="RollingFile" fileName="/opt/besu/logs/besu.log" filePattern="/opt/besu/logs/besu-%d{MM-dd-yyyy}-%i.log.gz" >
<PatternLayout alwaysWriteExceptions="false" pattern='${root.log.pattern}'/>
<RollingFile name="RollingFile" fileName="/opt/besu/logs/besu.log"
filePattern="/opt/besu/logs/besu-%d{MM-dd-yyyy}-%i.log.gz">
<PatternLayout alwaysWriteExceptions="false" pattern="${root.log.pattern}"/>
<Policies>
<TimeBasedTriggeringPolicy />
<SizeBasedTriggeringPolicy size="1000 MB" />
<TimeBasedTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="1000 MB"/>
</Policies>
</RollingFile>
</Appenders>
Expand All @@ -23,25 +25,25 @@
<Logger name="oshi" level="OFF" additivity="false"/>

<Logger name="io.netty" additivity="false">
<AppenderRef ref="RollingFile" level="WARN" />
<AppenderRef ref="RollingFile" level="WARN"/>
</Logger>

<Logger name="io.vertx" additivity="false">
<AppenderRef ref="RollingFile" level="WARN" />
<AppenderRef ref="RollingFile" level="WARN"/>
</Logger>

<Logger name="org.hyperledger.besu.ethereum.eth.transactions.BlobCache" additivity="false">
<AppenderRef ref="RollingFile" level="WARN" />
<AppenderRef ref="RollingFile" level="WARN"/>
</Logger>

<!-- https://github.com/hyperledger/besu/pull/6825 -->
<Logger name="io.opentelemetry.extension.trace.propagation.B3PropagatorExtractorMultipleHeaders">
<RegexFilter regex="Invalid TraceId in B3 header:.*" onMatch="DENY" onMismatch="NEUTRAL" />
<RegexFilter regex="Invalid TraceId in B3 header:.*" onMatch="DENY" onMismatch="NEUTRAL"/>
</Logger>

<Root>
<AppenderRef ref="Console" level="INFO" />
<AppenderRef ref="RollingFile" level="DEBUG" />
<AppenderRef ref="Console" level="INFO"/>
<AppenderRef ref="RollingFile" level="${env:ROOT_LOG_FILE_LEVEL:-DEBUG}"/>
</Root>
</Loggers>

Expand Down

0 comments on commit d825d9e

Please sign in to comment.