Skip to content
This repository was archived by the owner on Jan 16, 2026. It is now read-only.

feat: add logfmt to kona node logging formats#3027

Merged
theochap merged 2 commits intoop-rs:mainfrom
jelias2:jelias2/kona-node-logfmt-enodes
Nov 13, 2025
Merged

feat: add logfmt to kona node logging formats#3027
theochap merged 2 commits intoop-rs:mainfrom
jelias2:jelias2/kona-node-logfmt-enodes

Conversation

@jelias2
Copy link
Copy Markdown
Contributor

@jelias2 jelias2 commented Nov 12, 2025

Description

  • Adds logfmt to kona node available logging formats
  • Update just file to load docker image into local docker instance after docker buildx with load argument

Copilot AI review requested due to automatic review settings November 12, 2025 21:56
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds logfmt logging format support to the kona node logging infrastructure and updates the justfile to support loading Docker images into the local Docker instance.

Key changes:

  • Added Logfmt as a new logging format option alongside existing formats (full, json, pretty, compact)
  • Implemented custom LogfmtFormatter to format tracing events in logfmt key=value format
  • Updated justfile to accept an optional load_flag parameter for the build-local command

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
docker/apps/justfile Added optional load_flag parameter to build-local command to support loading Docker images with --load flag
crates/utilities/cli/src/tracing.rs Implemented LogfmtFormatter struct and added Logfmt enum variant to LogFormat, integrated formatter into logging layers
crates/utilities/cli/src/flags/log.rs Updated documentation comments to include logfmt in the list of available log formats

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +61 to +64
write!(writer, "level={} ", meta.level())?;

// Write target
write!(writer, "target={} ", meta.target())?;
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logfmt format implementation is inconsistent. According to the logfmt specification, all values should be quoted if they contain spaces or special characters. The level and target fields are not quoted, while time is quoted. For consistency and proper logfmt compliance, these should also be quoted.

Consider updating lines 61 and 64 to:

write!(writer, "level=\"{}\" ", meta.level())?;
write!(writer, "target=\"{}\" ", meta.target())?;
Suggested change
write!(writer, "level={} ", meta.level())?;
// Write target
write!(writer, "target={} ", meta.target())?;
write!(writer, "level=\"{}\" ", meta.level())?;
// Write target
write!(writer, "target=\"{}\" ", meta.target())?;

Copilot uses AI. Check for mistakes.
@codecov
Copy link
Copy Markdown

codecov bot commented Nov 13, 2025

Codecov Report

❌ Patch coverage is 0% with 21 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.3%. Comparing base (daa3535) to head (fd6bb68).
⚠️ Report is 6 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
crates/utilities/cli/src/tracing.rs 0.0% 21 Missing ⚠️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@theochap theochap enabled auto-merge November 13, 2025 18:29
@theochap theochap added this pull request to the merge queue Nov 13, 2025
Merged via the queue into op-rs:main with commit 6332a30 Nov 13, 2025
42 of 47 checks passed
theochap pushed a commit to ethereum-optimism/optimism that referenced this pull request Dec 10, 2025
# Description 
* Adds logfmt to kona node available logging formats
* Update just file to load docker image into local docker instance after
docker buildx with load argument
theochap pushed a commit to ethereum-optimism/optimism that referenced this pull request Jan 14, 2026
# Description 
* Adds logfmt to kona node available logging formats
* Update just file to load docker image into local docker instance after
docker buildx with load argument
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants