Skip to content

feat: added option for custom logging (Teku only)#1321

Merged
barnabasbusa merged 4 commits into
ethpandaops:mainfrom
lucassaldanha:teku-logging
Mar 4, 2026
Merged

feat: added option for custom logging (Teku only)#1321
barnabasbusa merged 4 commits into
ethpandaops:mainfrom
lucassaldanha:teku-logging

Conversation

@lucassaldanha
Copy link
Copy Markdown
Contributor

What/Why

The idea here is to bypass the global logging configuration, inject a log4j.xml directly into the container, and use it in Teku for fine-grained logging control.

One recent use case is during the implementation of partial messages, which requires changes to libp2p. Even during startup, we need to see TRACE messages from libp2p, but if we set the level to trace globally, or even just for the node, the amount of logging generated is absurd. Using a custom log4j.xml file, we were able to selectively enable TRACE messages for specific classes or packages.

Implementation details

  • Introduced a new option to participant called custom_log_config.
  • When custom_log_config is not set, or is false, we default to the standard behaviour, setting --logging and --log-destination;
  • When custom_log_config is true, we set -log-destination=CUSTOM what makes Teku skip any particular log configuration and expects a log4j configuration file.
  • It is up to the user to provide the correct configuration, the easiest way is to use an environment variable (refer to example).

Example

Here is an example of what the config would look like for Teku using a custom log4j.xml file:

extra_files:
  log4j.xml: |
    <?xml version="1.0" encoding="UTF-8"?>
    <Configuration status="INFO">
      <Properties>
        <Property name="root.log.level">INFO</Property>
      </Properties>

      <Appenders>
        <Console name="Console" target="SYSTEM_OUT">
          <PatternLayout
            pattern="%d{yyyy-MM-dd HH:mm:ss.SSSZZZ} | %t | %-5level | %c{1} | %msg %throwable%n" />
        </Console>
      </Appenders>

      <Loggers>
        <Logger name="io.libp2p.pubsub.gossip" level="TRACE" additivity="false">
          <AppenderRef ref="Console" />
        </Logger>

        <Root level="${sys:root.log.level}">
          <AppenderRef ref="Console" />
        </Root>
      </Loggers>
    </Configuration>

participants_matrix:
  el:
    - el_type: geth
      el_image: ethpandaops/geth:master
  cl:
    - cl_type: teku
      cl_image: ethpandaops/teku:master
      custom_log_config: true
      cl_extra_mounts:
        "/configs": "log4j.xml" #File available at: /configs/log4j.xml
      cl_extra_env_vars:
        LOG4J_CONFIGURATION_FILE: "/configs/log4j.xml" 
[...]

@lucassaldanha lucassaldanha changed the title Added option for custom logging (Teku only) feat: added option for custom logging (Teku only) Feb 24, 2026
@barnabasbusa barnabasbusa marked this pull request as ready for review March 4, 2026 21:22
@barnabasbusa barnabasbusa enabled auto-merge (squash) March 4, 2026 21:23
@barnabasbusa barnabasbusa merged commit 582ebad into ethpandaops:main Mar 4, 2026
14 checks passed
barnabasbusa pushed a commit that referenced this pull request Apr 1, 2026
🤖 I have created a release *beep* *boop*
---


##
[6.1.0](6.0.0...6.1.0)
(2026-04-01)


### Features

* Add Besu and Teku grafana dashboards
([#1281](#1281))
([7a3cc83](7a3cc83))
* add buildoor as separate mev stack
([#1309](#1309))
([903fd99](903fd99))
* add Caplin (Erigon embedded CL) as a supported consensus launcher
([#1339](#1339))
([173e3d5](173e3d5))
* add custom binary execution functionality
([#1287](#1287))
([68f9c19](68f9c19))
* add ews (execution witness sentry)
([#1285](#1285))
([5593889](5593889))
* add force_restart - to be able to replace images/binaries without
killing enclave
([#1289](#1289))
([e243677](e243677))
* add heze
([#1323](#1323))
([eb8c590](eb8c590))
* add mev-builder-cl-extra-params
([#1284](#1284))
([c7027e8](c7027e8))
* add min builder withdrawal delay
([#1294](#1294))
([7f67acd](7f67acd))
* Add skill for more efficient use of the package for running devnets
([#1326](#1326))
([ff545a6](ff545a6))
* add slashoor
([#1308](#1308))
([e4b3305](e4b3305))
* add snooper_params
([#1327](#1327))
([c2bc134](c2bc134))
* added option for custom logging (Teku only)
([#1321](#1321))
([582ebad](582ebad))
* Adding rakoon as tool
([#1303](#1303))
([0272744](0272744))
* **checkpointz:** add automatic GLOAS fork image detection
([#1344](#1344))
([44f21e7](44f21e7))
* **ci:** add consensoor
([#1301](#1301))
([865e221](865e221))
* **constants:** add 'consensoor' to CL_TYPE and VC_TYPE constants
([865e221](865e221))
* enable dora execution indexer
([#1282](#1282))
([5c8fd38](5c8fd38))
* enable execution details indexing & tracing for dora
([#1317](#1317))
([2f2690b](2f2690b))
* **launcher:** add publish_udp to participant configurations
([#1300](#1300))
([a412048](a412048))
* **launcher:** integrate consensoor client launcher
([865e221](865e221))
* replace ews with zkboost
([#1338](#1338))
([964a9f4](964a9f4))
* **starlark:** add Consensoor launcher support for Starlark
([865e221](865e221))
* support spinning up multiple relays
([#1272](#1272))
([c26e7e2](c26e7e2))
* update assertoor config
([#1312](#1312))
([8afc10c](8afc10c))
* use gloas-support image image for assertoor when gloas is scheduled
([#1318](#1318))
([f18408b](f18408b))
* **vc:** allow 'consensoor' VC type in vc_launcher
([865e221](865e221))


### Bug Fixes

* **besu:** remove CLIQUE from RPC API lists
([#1341](#1341))
([6307765](6307765))
* binary rename from nimbus_exe.. to nimbus
([#1325](#1325))
([343ae7f](343ae7f))
* bump ethereum-genesis-generator to 5.3.1
([#1330](#1330))
([429e3cb](429e3cb))
* bump ethereum-genesis-generator to 5.3.5
([#1332](#1332))
([56535d9](56535d9))
* bump GitHub Actions to latest releases
([#1342](#1342))
([0dedf87](0dedf87))
* bump kurtosis-assertoor-github-action to fix Node.js 20 deprecation
warnings
([#1336](#1336))
([b31af5e](b31af5e))
* claude skill install command does exist
([#1331](#1331))
([a0f3436](a0f3436))
* dora eip7732-support to gloas-support
([#1298](#1298))
([c6ca605](c6ca605))
* enable private discovery for Grandine for both built-in and external
vc
([#1315](#1315))
([7282336](7282336))
* enforce spammer names to avoid deduplication on spammor side
([#1296](#1296))
([2faba19](2faba19))
* fail if dummy first error handling
([#1290](#1290))
([8803a15](8803a15))
* grafana dashboard data source
([#1291](#1291))
([6b605f1](6b605f1))
* **input_parser:** expand VC matrix as cartesian product in
participants_matrix
([#1347](#1347))
([4cb71e5](4cb71e5))
* mev api ci startup bug
([#1297](#1297))
([103b078](103b078))
* treat besu/teku as special butterflies
([#1322](#1322))
([87df9d9](87df9d9))
* update assertoor ai models
([#1313](#1313))
([234fb54](234fb54))
* update docker/login-action to v4.0.0 for Node.js 24
([#1333](#1333))
([4918751](4918751))
* update kurtosis apt source to sdk.kurtosis.com
([#1334](#1334))
([b031d21](b031d21))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants