Why structured JSON logging for Hyperledger Besu matters before go-live
Structured logging lets a SIEM or log platform parse Besu events into fields you can filter, correlate and alert on, instead of matching free text. You need it before go-live when a permissioned network's logs must support investigations, incident response and audit evidence, because those reviews depend on consistent fields such as timestamps, log levels, logger names and node identity. Besu is an Apache 2.0 licensed Java execution client that LF Decentralized Trust now hosts as a Graduated project. It writes its logs through Log4j 2, which means the output format and the transport are choices you make in configuration, not properties fixed by the client.
Do not assume a Besu-specific log schema. The fields a given Besu release emits, how it nests exception data, and whether it includes node or peer identifiers all need to be confirmed against the version you will run in production. Take sample output from a test node at the release you plan to deploy, and map each field to the parser or index field your platform expects. Check this before writing any pipeline, because a mismatch discovered during an incident is far more expensive to fix than one found in a lab.
Decide early which log sources must reach the platform (consensus, peering, JSON-RPC access and the node's own startup and shutdown messages), who owns the Log4j 2 configuration, and how changes to it are tested and rolled out across validators and non-validator nodes. Those decisions set the format, the transport and the retention you can defend to auditors. The sections that follow cover format selection, the Log4j 2 configuration, runtime level changes and the ECS, GCP and GELF transports.
Which log format and transport fit your log platform
This table compares the log formats and transports relevant to Besu logging and what each one asks of the receiving platform and the Besu version in use. Read each row as a checklist: confirm the receiving side supports the format before you change the node configuration. The main takeaway is that the format choice follows from your log platform, and the Besu version and licensing of that platform must be checked before you commit.
| Option | Best fit | Receiving platform must support | Confirm in your Besu version |
|---|---|---|---|
| Plain text (default Log4j 2 pattern) | Teams that read logs by hand or forward raw lines to a basic collector | Line-based ingestion with a parser you write and maintain for each field | Default pattern and log levels still match your runbooks after upgrades |
| Besu JSON output | Teams that want structured records without an Elastic or Graylog-specific schema | A JSON parser and field mapping in your collector or SIEM | The JSON layout option and field names in the release you run |
| ECS (Elastic Common Schema) | Elastic-compatible stores such as Elasticsearch or OpenSearch with ECS field mappings | ECS-aware index templates, a shipper that writes ECS fields, and dashboards built on those names | A custom Log4j 2 ECS layout is present and its field names match your index templates |
| GELF over TCP or UDP | Graylog deployments that use a GELF input for structured messages | A GELF input on your Graylog server, a reachable port, and a transport choice that fits your loss tolerance | The GELF appender is available, and message fields map to Graylog streams you have defined |
| GCP-style JSON | Google Cloud Logging, where severity and timestamp fields must match the Cloud Logging format | Ingestion through the Cloud Logging agent or API with the expected severity and timestamp keys | The layout emits the severity and time fields the agent expects in your release |
| Graylog Open licensing | Organizations that evaluate Graylog Open as the receiving platform | Your legal and procurement review of the license terms before deployment | Graylog Open is licensed under SSPL-1.0, which is not an OSI-approved license, so review it before choosing Graylog |
How Besu logs flow from Log4j 2 to a log platform
Besu writes its log events through a Log4j 2 configuration, so every line that reaches a log platform passes through three stages: a logger that creates the event, an appender that formats it, and a delivery step that moves it off the node. The appender sets the output shape. It can write structured output to standard output or a file, which a shipper such as Filebeat or Fluent Bit reads and forwards to an Elastic-compatible ingest endpoint. Alternatively, a Log4j 2 appender can send events directly to a network input, such as a GELF input on a Graylog server. The two paths fail differently. A file-based path can lose events if the shipper falls behind log rotation, while a direct path depends on the network and on the input staying available. Choose the path before you write the configuration, because each one determines where monitoring belongs.
Parsing, field mapping and timestamps are handled in more than one place, and the team must know which hop owns each job. The appender controls the structure of each event. The shipper or the Graylog input may parse it again, and on Graylog, streams and processing pipelines route and transform messages after ingest. Index rotation and retention then decide how long those messages stay searchable. Assign one owner to each field mapping, so an ECS-style field is not renamed in the appender, again in the shipper and again in an ingest pipeline. For timestamps, confirm which time the target stores: when the node wrote the event, when the shipper read it, or when the platform received it. Compare time zones and timestamp formats on both sides, since mismatches appear later as events sorted into the wrong place in a search. Read the Graylog index model documentation before setting retention, because it explains how rotation and retention interact with message time.
Test the whole path with a running Besu node before anyone relies on it. A configuration that loads without error proves little. Use a non-production node built from the same Besu version and the same Log4j 2 file that production will use. Generate known events, such as a startup, a peer connection, a block import and a deliberately malformed JSON-RPC request. Then check in the target platform that each event arrives once, at the expected level, with the expected fields and a timestamp that matches the node clock. Change the log level at runtime and confirm the change takes effect and reverts as intended after a restart. Stop the input on purpose and observe whether events queue, drop or slow the node, then decide whether that behavior is acceptable. Record the results against the Besu version so that the next upgrade can be tested the same way.
How Besu logs reach a SIEM or log platform
The path starts at the Besu process on the node host, where Log4j 2 settings decide the log format and level. A console or file appender hands each event to a shipper or a direct transport, which sends it either to a Graylog GELF input backed by Graylog server nodes and a data node, or to an Elastic-compatible store. The trust boundary sits between the node host and the log platform, so check what leaves the host, how transport is protected, and who can read the stored events.
Besu log events flow from Log4j 2 appenders across the node host boundary into Graylog or an Elastic-compatible store.
How to configure structured logging for a Besu node
This sequence takes a Besu node from default console output to structured JSON events that a SIEM or log platform can index. Each step closes with a check you can run on the node or the receiving platform before you move on.
Confirm the Besu release and JDK 25
Run the Besu client with its version option on each node and record the release. The Besu 26.6.0 release notes state that Besu requires JDK 25 to build and run, so confirm the Java runtime on every host before you change logging. Compare the installed version with the current entries on the GitHub releases page, because the project ships roughly monthly. Done when the Besu version and the
java -versionoutput are recorded for every node in the change record.Write and version a custom Log4j 2 configuration
Start from the default Log4j 2 configuration that ships with your Besu distribution, and confirm its location in the Besu documentation before editing. Save your copy under a descriptive name such as
log4j2-besu-json.xmlin version control so every change has an author and a review. Leave the log levels unchanged at this stage, so any difference you see later comes from the format alone. Done when the file is committed and a diff against the shipped default shows only the appender and layout changes you intended.Set the JSON layout and appenders
Choose the layout by destination. An ECS layout suits Elastic-compatible stores, a GELF appender sends events to a Graylog GELF input, and a JSON console appender suits a container runtime that collects standard output. Use one appender per destination and keep the timestamp, level, logger name and thread fields in every event. Confirm that any JSON or GELF library you add is compatible with the Log4j 2 version in your Besu release, and confirm the field names your cloud logging service expects. Done when a local run prints one valid JSON object per line on the console appender.
Point the node at the configuration file
Set the Log4j 2 configuration path through the JVM system property
log4j.configurationFile, passed to the Besu process with the JAVA_OPTS environment variable or the equivalent setting in your service manager. Confirm in the Besu logging documentation that your release reads this setting. Restart one non-validator node first, because a malformed file can stop the logger from starting. Done when the process arguments show the property, the startup events appear as JSON, and the setting survives a node restart.Change log levels at runtime and revert them
Raise the level of one logger, such as the peer or sync package, while you investigate, rather than changing the root level for the whole node. Use the Besu admin JSON-RPC method for changing log levels only where the admin API is enabled and reachable from a restricted network, and confirm the method name and parameters in the documentation for your release. Record the previous level, reproduce the problem, and set the level back. Done when the logger reports its original level, the debug events stop, and the change appears in the incident record.
Send test events to the receiving platform
For Graylog, create a GELF input that matches the transport and port in your appender, then trigger a known event such as a logger level change at info level. Search for that message in Graylog and confirm it arrived in the expected stream. For an Elastic-compatible store, confirm that the index template or ingest pipeline maps the ECS fields before you send production volume. Done when the test message is searchable on the receiver with the same message text, level and node identifier that the node wrote locally.
Verify fields, timestamps and retention
Compare a sample event field by field against the matching local log line. Confirm the timestamp format and time zone that your platform expects, that stack traces stay within one event, and that level names match what your alert rules use. Then size storage with the Graylog guidance of daily ingest times retention days times 120 percent, and confirm that index rotation and retention delete the oldest indices as your policy requires. Done when a sample event passes the field checklist and the calculated storage fits the volume you measured on the node.
Changing Besu log levels at runtime without restarts
Routine operation should run at the conservative levels defined in the Log4j 2 configuration your platform team has reviewed. At this baseline, the log platform receives operational events, warnings and errors without per-message detail. Changes to the baseline are configuration changes, not incident actions, so they should move through your normal change process.
- Baseline level: Keep the root logger and Besu packages at an informational level, and confirm the default in the configuration file you deployed.
- Change path: Edit the custom configuration and roll it out through your deployment tooling so every change is versioned and reviewable.
- Approval: The platform owner approves baseline changes, and the security team reviews any change that touches loggers for authentication, peers or permissioning.
- Audit: Keep the configuration in version control so each change has an author, a reviewer and a timestamp that auditors can trace.
- Sensitive data: Confirm that the baseline never writes private keys, raw transaction payloads or full RPC request bodies, whatever level is set.
Before each release window, check that the effective level on every node matches the approved baseline, so no temporary setting has drifted into routine operation.
During an incident, responders often need more detail from one subsystem, such as peer connections or block import, without raising the whole node to debug. Keep the change narrow: one named logger, one affected node and a fixed window. Confirm in the Besu documentation for your release which runtime log level mechanism applies and how it is authenticated before you rely on it in a runbook.
- Scope: Name a specific logger and a single node, and avoid root-level debug on validators or on nodes serving production applications.
- Approval: The incident commander approves the change, and the ticket records the logger, the node, the previous level and the planned end time.
- Access: Any runtime call over JSON-RPC must use the authentication you configured, either a credentials file or externally issued JWTs, as described in the Besu authentication documentation. Besu does not terminate HTTPS natively, so place the endpoint behind TLS and restrict the source addresses that can reach it.
- Audit: Record who made each call, when, and which logger changed, and keep proxy access logs alongside Besu logs.
- Sensitive data: Debug output can include peer addresses, transaction details and request content, so limit who can read the destination index and shorten the window.
Close the change with an explicit expiry in the ticket and a named owner responsible for reverting it.
Temporary debug levels are a common cause of excess log volume and data exposure when they remain set after an incident closes. Reversion should be a required step in the incident checklist, with a named owner, a read-back of the effective level on every touched node and sign-off before the incident is closed. Confirm whether a node restart resets runtime changes in the Besu documentation for your release, and do not assume either way.
- Revert every change: Set each changed logger back to the approved baseline on every node touched, including nodes that were changed and later restarted.
- Verify: Read back the effective level on each node and confirm that debug volume has dropped on the log platform.
- Approval: The incident owner signs off on closure, listing the reverted nodes and loggers.
- Audit: Attach the revert calls and read-back results to the incident record, and keep them for the period your log and incident retention policy requires.
- Data cleanup: Review what debug output reached the log platform, restrict access or apply retention rules where policy requires, and involve privacy or legal staff if personal data appeared in the logs.
Review the gap between incident closure and verified reversion in the postmortem, and fold any lessons into the runbook.
Security risks in Besu log pipelines
Besu logs describe node peers, block production and, at debug levels, more detail than most teams expect. Each risk below sits on a different hop: the node, the transport, the log store, the record itself and the people who change log levels. Check all six before any log pipeline carries production Besu output.
Sensitive data in log output
Besu logs node identity, peer addresses, validator activity and transaction-related events. Verbose levels can expose more context than operators intend, and a log platform often reaches more staff than the node does. Before go-live, sample real log lines at each level you plan to ship and confirm that no key material, credentials or private consortium data appears. Restrict what leaves the node, not only who can read it afterwards.
Transport encryption to the log platform
Besu does not terminate HTTPS natively, so the node cannot protect an HTTP path to a log collector on its own. If logs travel over HTTP or plain GELF or syslog, they cross the network in readable form. Use a TLS-terminating proxy, a sidecar or a log shipper with TLS on every hop, and confirm the certificate validation settings on the receiving input rather than assuming they are on.
Besu API authenticationAccess control and retention in the log store
Log platforms hold search, dashboards and exports in one place, so read access often becomes a wider exposure than the node itself. Map who can search Besu indices, who can export them and who can change retention. Set retention by policy rather than by storage capacity, and confirm that deleting old indices is an approved, logged action. Graylog's index model deletes the oldest indices under retention, which should match the policy you wrote.
Integrity of stored log records
Logs are evidence only if they cannot be quietly edited after the fact. Decide where the authoritative copy lives, whether the node writes to a local file that a shipper later reads, and whether the store offers write-once or append-only behavior for that index. Compare counts and timestamps between the node and the store during testing, and alert when a gap appears in the stream rather than assuming delivery succeeded.
Separation of duties for log level changes
Besu can change log levels at runtime, which is useful during an incident and risky when one administrator can raise verbosity, collect sensitive output and then lower it without review. Define who may change levels on production nodes, record each change in a ticket or audit trail, and set a time limit that returns the node to its baseline level. Confirm how the node's JSON-RPC access is authenticated before granting that right to anyone.
Log shipping as an unauthenticated write path
A log collector that accepts any sender lets an attacker inject false entries that look like node output, which can hide real activity or trigger false alerts. Restrict each input to known source addresses, require authentication where the input supports it, and separate Besu inputs from application inputs so a compromised source cannot write into both. Test the input with a forged message from an untrusted host before go-live.
Questions teams ask before logging for Besu is outsourced
How much effort does structured logging for Besu take?
The effort depends mostly on how many node roles you run, how many log sources feed the same platform, and how much parsing and dashboard work the security team expects. A single validator and RPC node with one target platform is a narrow job. A consortium network with validators, RPC nodes, boot nodes and application gateways, each emitting logs that must be normalized in one format, is a wider one. The main work items are choosing the output format, writing and testing a custom Log4j 2 configuration, setting up the receiving input and parsing, and validating that fields such as level and logger name arrive intact. Ask any provider to break the quote into those items so you can see what each one covers.
Can our in-house team set up Besu logging without an outside partner?
Yes, if you have engineers who can edit Log4j 2 configuration, operate the log platform and test changes on a non-production node. Besu's logging is configured through standard Log4j 2 files, so the skills overlap with the Java operations many platform teams already have. What usually takes the longest is not the configuration itself but agreeing on the log schema with the SIEM owner, testing that parsing holds across Besu upgrades, and getting change approval for production node restarts. An outside partner can help where your team lacks Log4j 2 or log pipeline experience, or where the work needs to fit a fixed timeline. Confirm your team's capacity against the same list of items before deciding.
What does the client need to provide for a logging engagement?
A logging engagement needs more than a node list. Plan to provide:
- Read and write access to the Besu host configuration, service units and container definitions, in a test environment first.
- A named owner for the log platform who can approve new inputs, index settings and retention.
- Change approval for restarting validator and RPC nodes, since log configuration changes usually require a restart unless runtime level changes cover your need.
- Agreed retention and data handling rules, because log content can include account addresses and transaction hashes.
- Access to the existing SIEM use cases so the new fields map to what analysts already search.
What does Graylog Open cost, and what do Enterprise and Security plans start at?
According to the Graylog pricing page, Graylog Open is free with no volume limits and community support. Graylog Enterprise starts at 15,000 US dollars per year and Graylog Security starts at 18,000 US dollars per year. Both paid plans have a minimum of 10 GB per day or 100 Graylog Compute Units and are licensed on processed data, with no per-user or per-device fees. Those license costs are only one line. Your total cost also includes the Graylog server nodes, MongoDB, Graylog Data Node or self-managed OpenSearch, storage sized for your retention period, and the staff time to run them. Check the current terms on the pricing page before budgeting, because plan limits and inclusions can change.
How long does a Besu logging project take?
The timeline depends on the environment more than on the logging format itself. The main variables are the number of nodes and hosts, whether logs go to a platform that already exists or one you must build, how quickly your SIEM owner can review fields and alerts, and how many change windows you need for production restarts. Storage sizing also affects the schedule. The Graylog system architecture guidance advises sizing storage as daily ingest times retention days times 120 percent, and the message journal at 3 to 5 times daily ingest on SSDs, so the platform needs a sizing exercise before rollout. Ask any provider for a schedule that separates test, pilot and production waves and names the change windows it depends on.
Does the logging work need to match a Graylog or Elastic version?
Yes, the receiving platform sets constraints you need to check before the build starts. For Graylog, the compatibility matrix says Graylog 7.0 to 7.2 need MongoDB 7.x up to 8.2.x and support OpenSearch from 1.1.x up to 3.7.x, and Graylog Security needs OpenSearch 2.0 or later. Graylog also deprecates OpenSearch 1.x and recommends Data Node as the search backend. Confirm which Graylog version your organization has approved, which storage backend it runs, and whether a Graylog Security feature is part of the plan before choosing the output format. These choices affect how fields are indexed and which parsing rules you must maintain.
Does DeployOpen issue audit evidence for SIEM coverage?
No. DeployOpen prepares systems, controls and evidence for compliance assessments, but it does not issue audit reports, attestations or certifications. For a logging project, that means DeployOpen can configure log sources, document the log fields and retention settings, and prepare the evidence your auditor will ask to see, such as configuration files, sample events and access records. The auditor or certification body decides whether that evidence meets the applicable requirements. Confirm with your assessor which artifacts they expect before the build starts, so the evidence is collected as the system is built rather than reconstructed later.
What should the quote for a logging engagement include?
Most DeployOpen engagements are fixed-scope, so the written scope, deliverables and timeline are agreed before work starts, and the quote follows from that scope. Ask for the list of node roles and hosts in scope, the target platform and version, the Log4j 2 configuration and runtime log level procedure to be delivered, the parsing and field mapping test plan, the dashboards or saved searches included, the handover and documentation items, and what happens after go-live. Also ask which items are one-time work and which recur, such as platform licensing, storage growth and upgrade testing. A quote that lists these clearly is easier to compare with an in-house estimate.
How DeployOpen scopes and delivers Besu logging pipelines
DeployOpen plans, builds, documents and supports the logging path from Besu nodes into the log platform you already run or plan to run. Each engagement starts with a written scope that fixes the log format, the target (ECS-compatible store, GCP or Graylog through GELF), the nodes covered and the handover deliverables.
How we scope
- Confirm which Besu nodes, validators and RPC hosts emit logs that must reach the platform
- Agree the target: an Elastic-compatible store with ECS fields, Google Cloud Logging, or Graylog with GELF
- Record retention, access, and log-level policy in the written scope before any configuration work starts
How we build
- Write and test a custom Log4j 2 configuration for each node role against your chosen JSON layout
- Set up the forwarding path and check that events arrive with the fields your analysts and alerts need
- Document runtime log level changes so operators can raise verbosity during an incident and restore it afterward
How we hand over
- Deliver the configuration files, forwarder settings and a field reference for the agreed log format
- Provide a runbook covering verification checks, log level procedures and what to do when a forwarder stops
- Walk your platform and security teams through dashboards, searches and the alert sources in the written scope
How we support
- Ongoing support covers Besu version changes that affect log output, and is available as a retainer
- Retesting follows Besu upgrades and changes to the log platform version or license tier
- Support requests are handled against the scope agreed in writing, with pricing set by a quote from that scope

