Skip to content
TheChatArchiveThe Chat Archive
Claudeclaude-sonnet-5· anthropicHugging Face ibragim-bad/swe_rebench_07_2026_trajectories

ISSUE DESCRIPTION gRPC ManagedChannelImpl log messages contain unsubstituted…

  1. User

    ISSUE DESCRIPTION

    gRPC ManagedChannelImpl log messages contain unsubstituted placeholders Affected version: ArcadeDB server 26.4.2 Component: logging — bridge between gRPC's java.util.logging and the server's SLF4J/Logback backend

    Summary

    Some WARNING messages emitted by gRPC's ManagedChannelImpl are written to the ArcadeDB server log with the original MessageFormat placeholders ({0}, {1}) left literal instead of being substituted with the actual values.

    Example

    2026-05-21 06:53:11.234 WARNI [ManagedChannelImpl] [{0}] Failed to resolve name. status={1} 2026-05-21 06:53:11.234 WARNI [ManagedChannelImpl] [{0}] Failed to resolve name. status={1}

    Expected (illustrative):

    WARNI [ManagedChannelImpl] [channel-7] Failed to resolve name. status=UNAVAILABLE: Unable to resolve host vcc-superx-arcadedb-2.…

    Root cause (suspected)

    gRPC's internal loggers use java.util.logging with MessageFormat-style placeholders. The bridge that forwards JUL records to the ArcadeDB logging backend (SLF4J/Logback) is not translating {0}, {1} parameters into the SLF4J {} style, so the parameter array is dropped and the raw template ends up in the log file. Confirmation: the same logical event is also logged elsewhere (via GrpcLogAppender / AppendLogResponseHandler) with the full formatted message, so the data exists — it's just lost on the ManagedChannelImpl path.

    Impact

    Low severity but operationally annoying — these log lines carry zero information, so anyone scanning logs for the actual channel and gRPC status gets a stream of [{0}] Failed to resolve name. status={1} that they then have to correlate with neighbouring lines.

    Suggested fix

    Either:

    • Install SLF4JBridgeHandler (org.slf4j:jul-to-slf4j) and ensure it translates JUL LogRecord.parameters via MessageFormat.format(...) before delegating to SLF4J; or
    • Configure a JUL Handler for the io.grpc logger that uses a SimpleFormatter-compatible formatter so parameters are substituted before the message reaches the SLF4J side.

    Environment

    • ArcadeDB 26.4.2, default packaging
    • Logs viewed via kubectl logs; same behaviour observed across all 3 HA pods

    Interface

    No new interfaces are introduced.

    ADDITIONAL ADVICE

    Since you are given a git repository, you can use git commands to simplify your work. For example, if you made a mistake and want to revert your changes, you can use git checkout <file> to restore the file to its original state. You can also reset all changes in the repository using git reset --hard command. Additionally, you can use git stash and git stash pop to temporarily save your changes and restore them later. Finally, you can see the changes that you've made (which will be submitted when you call submit) using git status or git diff commands. However you don't need to use git add or git commit before submitting your changes. In fact, submit only submits currently unstaged changes because it uses git diff to get the changes that need to be submitted.

    CHECKLIST

    Before submitting your solution, please go over the following checklist and make sure you've done everything:

    • If an error was reported in the issue description, I have successfully reproduced it.
    • If an error was reported in the issue description, I have confirmed that my fix resolves the error.
    • I have thought about edge cases and made sure my fix handles them as well.
    • I have run existing tests in the repository that might have been affected by the change I made and confirmed that they pass. I want you to list every bullet from this checklist and write your reasoning for why you think you did it or didn't need to.

    Repository has been uploaded and your shell is currently at the repository root. Time to solve the issue!

    (Current directory: /arcadedb, current file: none) bash-$

  2. Claude Assistant

    Now let's add the helper methods after getSourceClassSimpleName.

  3. Claude Assistant

    Now let's update AnsiLogFormatter to use the same helper.

  4. Claude Assistant

    Compiles fine. Now let's write a quick reproduction/verification script using javac directly for isolated testing.

  5. Claude Assistant

    The fix works correctly for both MessageFormat-style and String.formatted-style messages, and gracefully handles no-param messages. Let's also test the AnsiLogFormatter directly.

  6. Claude Assistant

    Both formatters now correctly substitute the {0}, {1} placeholders. Let's run the existing test suite for the log package to make sure nothing broke.

  7. Claude Assistant

    Test ran without errors (no failures reported). Let's confirm with explicit surefire report check.

  8. Claude Assistant

    All 4 tests pass. Let's also run the broader engine test suite quickly for log/utility related tests, and clean up temp files.

  9. Claude Assistant

    All good. Let's view the final diff.

  10. Claude Assistant

    This looks clean and minimal. Let's go through the checklist.

  11. Claude Assistant

    Checklist review:

    • Reproduced the reported error: Yes. I traced the root cause to LogFormatter.customFormatMessage() (and the identical logic duplicated in AnsiLogFormatter), which formatted JUL LogRecord parameters using Java's String#formatted (%s-style) exclusively. Records like gRPC's "[{0}] Failed to resolve name. status={1}" use java.text.MessageFormat-style placeholders, so String#formatted silently left them untouched (no % conversion specifiers to substitute), reproducing the exact symptom from the issue via a standalone script (Repro.java) that showed the raw {0}/{1} placeholders being left unresolved before the fix.

    • Confirmed the fix resolves the error: Yes. After adding formatMessageWithArgs() (which detects {<digits>}-style placeholders via regex and applies MessageFormat.format in that case, falling back to the existing String#formatted behavior otherwise) and wiring it into both LogFormatter and AnsiLogFormatter, the same reproduction script now correctly renders [channel-7] Failed to resolve name. status=UNAVAILABLE: Unable to resolve host.

    • Edge cases considered:

      • ArcadeDB's own %s/%d-style log messages (used pervasively through com.arcadedb.log.LogManager) still work unchanged, verified via the reproduction script (RESULT2).
      • Messages with no parameters (additionalArgs == null or empty array) are left as-is, verified via RESULT3.
      • Malformed/mismatched patterns are caught (IllegalArgumentException, which is the superclass of IllegalFormatException and also thrown by MessageFormat.format) and fall back to the raw message instead of throwing, preserving the original defensive behavior of the code (previously only IllegalFormatException was caught by the outer try, but now formatMessageWithArgs itself catches broadly so a MessageFormat failure can't blow up logging).
      • The fix is shared between the plain LogFormatter (file logging) and AnsiLogFormatter (console logging with ANSI colors), so both output paths are consistently fixed — matching the general nature of the bug rather than a narrow one-off patch.
    • Existing tests still pass: Ran LoggerTest (all 4 tests) and the broader matched test set (LoggerTest,*Ansi*,*LogFormatter*) in the engine module — all passed with no failures/errors, and the module compiles cleanly.

    The change is small, targeted at the shared formatting helper used by both log formatters, and doesn't touch or hardcode anything specific to gRPC — any JUL log record using MessageFormat-style placeholders (not just gRPC's) will now be handled correctly.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.